X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 770289FB21A; Fri, 28 Jul 2006 01:05:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97597-05; Fri, 28 Jul 2006 01:05:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by postgresql.org (Postfix) with ESMTP id A94559FB20D; Fri, 28 Jul 2006 01:05:05 -0300 (ADT) Received: from lythanhphu ([66.130.229.163]) by VL-MO-MR003.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0J33006NVI0FI840@VL-MO-MR003.ip.videotron.ca>; Fri, 28 Jul 2006 00:05:03 -0400 (EDT) Date: Fri, 28 Jul 2006 00:05:06 -0400 From: Daniel CAUNE Subject: Re: [SQL] PostgreSQL server terminated by signal 11 In-reply-to: <20060727194921.d6389185.darcy@druid.net> To: "'D'Arcy J.M. Cain'" , 'Daniel Caune' Cc: tgl@sss.pgh.pa.us, pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Message-id: <0J33006NWI0FI840@VL-MO-MR003.ip.videotron.ca> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Thread-index: Acax2E0HNUjVSFgQTGeq4O6n6T9iDQAIR9pg X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200607/253 X-Sequence-Number: 22499 > -----Message d'origine----- > De : pgsql-sql-owner@postgresql.org = [mailto:pgsql-sql-owner@postgresql.org] > De la part de D'Arcy J.M. Cain > Envoy=C3=A9 : jeudi 27 juillet 2006 19:49 > =C3=80 : Daniel Caune > Cc : tgl@sss.pgh.pa.us; pgsql-admin@postgresql.org; pgsql- > sql@postgresql.org > Objet : Re: [SQL] PostgreSQL server terminated by signal 11 >=20 > On Thu, 27 Jul 2006 19:00:27 -0400 > "Daniel Caune" wrote: > > I run the command responsible for creating the index and I entered > "continue" in gdb for executing the command. After a while, the = server > crashes: > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x08079e2a in slot_attisnull () >=20 > That's a pretty small function. I don't see much room for error. = This > diff in src/backend/access/common/heaptuple.c seems like the most > likely place to catch it. >=20 > RCS file: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v > retrieving revision 1.110 > diff -u -p -u -r1.110 heaptuple.c > --- heaptuple.c 14 Jul 2006 14:52:16 -0000 1.110 > +++ heaptuple.c 27 Jul 2006 23:37:54 -0000 > @@ -1470,8 +1470,13 @@ slot_getsomeattrs(TupleTableSlot *slot, > bool > slot_attisnull(TupleTableSlot *slot, int attnum) > { > - HeapTuple tuple =3D slot->tts_tuple; > - TupleDesc tupleDesc =3D slot->tts_tupleDescriptor; > + HeapTuple tuple; > + TupleDesc tupleDesc; > + > + assert(slot !=3D NULL); > + > + tuple =3D slot->tts_tuple; > + tupleDesc =3D slot->tts_tupleDescriptor; >=20 > /* > * system attributes are handled by heap_attisnull >=20 > Of course, you still have to find out what's calling it with slot set > to NULL if that turns out to be the problem. It may also be that slot > is not NULL but set to garbage. You could also add a notice there. > Two, in fact. One to display the address of slot and one to display > the value of slot->tts_tuple or slot->tts_tupleDescriptor. If the > first shows a non NULL value and the second causes your crash that > tells you that the value of slot is probably trashed before > calling the function. >=20 Yes, I was afraid to go that deeper, but it's time! :-)) Actually it seems, from the source code, that a null slot->tts_tuple = won't lead to a segmentation fault in function slot_attisnull, while = slot and slot->tts_tupleDescriptor will. I will trace the function = trying to discover what goes wrong behind the scene. > Do this in conjunction with Tom Lane suggestion of "--enable-debug" = for > more information. >=20 OK -- Daniel