Обсуждение: BUG #3763: crash after create table with primary key defined

Поиск
Список
Период
Сортировка

BUG #3763: crash after create table with primary key defined

От
"migo"
Дата:
The following bug has been logged online:

Bug reference:      3763
Logged by:          migo
Email address:      admin@abp.pl
PostgreSQL version: 8.2.4
Operating system:   Gentoo
Description:        crash after create table with primary key defined
Details:

On psql console:

=>  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
Nov 20 11:02:04 www postgres[32758]: [4-2] wolni>DETAIL:  The postmaster has
commanded this server process to roll back the current transaction and exit,
because another
Nov 20 11:02:04 www postgres[32758]: [4-3]  server process exited abnormally
and possibly corrupted shared memory.
Nov 20 11:02:04 www postgres[32758]: [4-4] wolni>HINT:  In a moment you
should be able to reconnect to the database and repeat your command.
Nov 20 11:02:04 www postgres[32731]: [4-1] >LOG:  all server processes
terminated; reinitializing
Nov 20 11:02:04 www postgres[32759]: [5-1] >LOG:  database system was
interrupted at 2007-11-20 11:01:46 CET
Nov 20 11:02:04 www postgres[32759]: [6-1] >LOG:  checkpoint record is at
0/F5FBD7FC
Nov 20 11:02:04 www postgres[32759]: [7-1] >LOG:  redo record is at
0/F5FBD7FC; undo record is at 0/0; shutdown TRUE
Nov 20 11:02:04 www postgres[32759]: [8-1] >LOG:  next transaction ID:
0/2321145; next OID: 206248
Nov 20 11:02:04 www postgres[32759]: [9-1] >LOG:  next MultiXactId: 1; next
MultiXactOffset: 0
Nov 20 11:02:04 www postgres[32759]: [10-1] >LOG:  database system was not
properly shut down; automatic recovery in progress
Nov 20 11:02:04 www postgres[32759]: [11-1] >LOG:  redo starts at
0/F5FBD844
Nov 20 11:02:04 www postgres[32759]: [12-1] >LOG:  unexpected pageaddr
0/F0FD4000 in log file 0, segment 245, offset 16596992
Nov 20 11:02:04 www postgres[32759]: [13-1] >LOG:  redo done at 0/F5FD3194
Nov 20 11:02:05 www postgres[32759]: [14-1] >LOG:  database system is ready


What's wrong?

Re: BUG #3763: crash after create table with primary key defined

От
Simon Riggs
Дата:
On Tue, 2007-11-20 at 10:12 +0000, migo wrote:
> The following bug has been logged online:
>
> Bug reference:      3763
> Logged by:          migo
> Email address:      admin@abp.pl
> PostgreSQL version: 8.2.4
> Operating system:   Gentoo
> Description:        crash after create table with primary key defined
> Details:
>
> On psql console:
>
> =>  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.

Is this behaviour repeatable?

--
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com

Re: BUG #3763: crash after create table with primary keydefined

От
Heikki Linnakangas
Дата:
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.

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?

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Re: BUG #3763: crash after create table with primary keydefined

От
Simon Riggs
Дата:
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:  CREATE TABLE /
> >> 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 (PID 32757)
> >> 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. :-(

--
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com