Re: BUG #3763: crash after create table with primary keydefined
Dnia Wt Listopada 20 2007, 12:46, Heikki Linnakangas napisaďż˝(a):
Simon Riggs wrote:
On Tue, 2007-11-20 at 10:12 +0000, migo wrote:
=> CREATE TABLE phpbb_acl_roles_data ( role_id INT4 DEFAULT '0' NOT NULL
CHECK (role_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK
(auth_option_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL, PRIMARY
KEY
(role_id, auth_option_id) );
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
wolni=>
In logs after this:
Nov 20 11:02:04 www postgres[32757]: [4-1] wolni>NOTICE: CREATE TABLE /
PRIMARY KEY will create implicit index "phpbb_acl_roles_data_pkey" for
table
Nov 20 11:02:04 www postgres[32757]: [4-2] "phpbb_acl_roles_data" Nov
20 11:02:04 www postgres[32758]: [2-1] [unknown]>LOG: connection
received: host=[local]
Nov 20 11:02:04 www postgres[32758]: [3-1] wolni>LOG: connection
authorized: user=wolni database=wolni
Nov 20 11:02:04 www postgres[32731]: [2-1] >LOG: server process (PID
32757)
was terminated by signal 11
Nov 20 11:02:04 www postgres[32731]: [3-1] >LOG: terminating any
other
active server processes
Nov 20 11:02:04 www postgres[32758]: [4-1] wolni>WARNING: terminating
connection because of crash of another server process
Looks to me that the process that crashed was not the process that
issued the CREATE TABLE command. So it could be something else
entirely.
Strange thinks it that this happen only when i log into psql via "wolni"
user. When i do this as postgres admin all works fint too.
User 'wolni' has granted all privilages to database 'wolni'.
To me it does look like it was the CREATE TABLE that crashed. The NOTICE
shows that it's process ID 32757 that's running the CREATE TABLE, and
the LOG line later on says that that's the process that crashed.Is this behaviour repeatable?
I couldn't reproduce this on my laptop with 8.2.4. Migo, is it possible
for you to get a core dump and a back trace out of it? Is there anything
unusual about the system / compiler / compiler options used?
Its gentoo distribution.
# gcc -v
gcc version 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0,
pie-8.7.10)
with opts:
CFLAGS="-march=prescott -O2 -pipe -fforce-addr -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
On another my system (with gentoo too, and postgresql 8.2.4 all queries
works).
admin@abp.pl wrote:
Dnia Wt Listopada 20 2007, 12:46, Heikki Linnakangas napisaďż˝(a):
Simon Riggs wrote:
On Tue, 2007-11-20 at 10:12 +0000, migo wrote:
=> CREATE TABLE phpbb_acl_roles_data ( role_id INT4 DEFAULT '0' NOT NULL
CHECK (role_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK(auth_option_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL, PRIMARY
KEY(role_id, auth_option_id) );
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.wolni=>
In logs after this:
Nov 20 11:02:04 www postgres[32757]: [4-1] wolni>NOTICE: CREATE TABLE /
PRIMARY KEY will create implicit index "phpbb_acl_roles_data_pkey" fortable
Nov 20 11:02:04 www postgres[32757]: [4-2] "phpbb_acl_roles_data" Nov
20 11:02:04 www postgres[32758]: [2-1] [unknown]>LOG: connection
received: host=[local]Nov 20 11:02:04 www postgres[32758]: [3-1] wolni>LOG: connection
authorized: user=wolni database=wolni
Nov 20 11:02:04 www postgres[32731]: [2-1] >LOG: server process (PID
32757)
was terminated by signal 11
Nov 20 11:02:04 www postgres[32731]: [3-1] >LOG: terminating anyother
active server processes
Nov 20 11:02:04 www postgres[32758]: [4-1] wolni>WARNING: terminatingconnection because of crash of another server process
Looks to me that the process that crashed was not the process that
issued the CREATE TABLE command. So it could be something else
entirely.Strange thinks it that this happen only when i log into psql via "wolni"
user. When i do this as postgres admin all works fint too.
User 'wolni' has granted all privilages to database 'wolni'.To me it does look like it was the CREATE TABLE that crashed. The NOTICE
shows that it's process ID 32757 that's running the CREATE TABLE, and
the LOG line later on says that that's the process that crashed.Is this behaviour repeatable?
I couldn't reproduce this on my laptop with 8.2.4. Migo, is it possible
for you to get a core dump and a back trace out of it? Is there anything
unusual about the system / compiler / compiler options used?Its gentoo distribution.
# gcc -v
gcc version 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0,
pie-8.7.10)with opts:
CFLAGS="-march=prescott -O2 -pipe -fforce-addr -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
Ok, you've used -fomit-frame-pointer, so we can't get meaningful debug
information out of it. :-(
Can you please recompile without -fomit-frame-pointer, and reconfigure
postgres with --enable-debug and --enable-cassert? You don't want the
--enable-cassert in production, since it slows things down, but
--enable-debug shouldn't hurt.
On another my system (with gentoo too, and postgresql 8.2.4 all queries
works).
Is it on similar hardware? Same configure and compiler options?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Dnia Wt Listopada 20 2007, 15:02, Zdenek Kotala napisaďż˝(a):
admin@abp.pl wrote:
Dnia Wt Listopada 20 2007, 14:20, Simon Riggs napisaďż˝(a):
On Tue, 2007-11-20 at 11:46 +0000, Heikki Linnakangas wrote:
In logs after this:
Nov 20 11:02:04 www postgres[32757]: [4-1] wolni>NOTICE: CREATETABLE /
PRIMARY KEY will create implicit index "phpbb_acl_roles_data_pkey"
for
table
Nov 20 11:02:04 www postgres[32731]: [2-1] >LOG: server process
(PID32757)
was terminated by signal 11
To me it does look like it was the CREATE TABLE that crashed. The
NOTICE
shows that it's process ID 32757 that's running the CREATE TABLE,
and
the LOG line later on says that that's the process that crashed.Yep, agreed. :-(
OK so what we can do now?
Do you have core file? It is usually stored in data postgreSQL
directory. Can you provide stack trace to determine which function
fails? It is very important.
I cant get core file now.
wolni=> CREATE TABLE phpbb_acl_roles_data ( role_id INT4 DEFAULT '0' NOT
NULL CHECK (role_id >= 0), auth_option_id INT4 DEFAULT '0' NOT NULL CHECK
(auth_option_id >= 0), auth_setting INT2 DEFAULT '0' NOT NULL);
CREATE TABLE
...
what's happen when you create primary key by alter table command?
wolni=> ALTER TABLE phpbb_acl_roles_data add PRIMARY KEY (role_id,
auth_option_id);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index
"phpbb_acl_roles_data_pkey" for table "phpbb_acl_roles_data"
WARNING: you don't own a lock of type RowExclusiveLock
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
but when
what's happen when you create unique index on (role_id, auth_option_id)?
wolni=> CREATE UNIQUE INDEX indeks ON phpbb_acl_roles_data (role_id,
auth_option_id);
CREATE INDEX
Is it fresh database? Can you reproduce it on the same machine with the
same postgreSQL installation on new created database cluster?
Yes, its fresh database (without tables).
Regards
--
Tomasz
Import Notes
Resolved by subject fallback