Обсуждение: Re: [SQL] PostgreSQL server terminated by signal 11

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

Re: [SQL] PostgreSQL server terminated by signal 11

От
"Daniel Caune"
Дата:

> -----Message d'origine-----
> De : Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Envoyé : jeudi, juillet 27, 2006 19:26
> À : Daniel Caune
> Cc : pgsql-admin@postgresql.org; pgsql-sql@postgresql.org
> Objet : Re: [SQL] PostgreSQL server terminated by signal 11
>
> "Daniel Caune" <daniel.caune@ubisoft.com> writes:
> > 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 ()
> >   (gdb)
> >   Continuing.
>
> >   Program terminated with signal SIGSEGV, Segmentation fault.
> >   The program no longer exists.
>
> > I can't do "bt" since the program no longer exists.
>
> I think you typed one carriage return too many and the thing re-executed
> the last command, ie, the continue.  Try it again.
>

You were right.

Program received signal SIGSEGV, Segmentation fault.
0x08079e2a in slot_attisnull ()
(gdb) bt
#0  0x08079e2a in slot_attisnull ()
#1  0x0807a1d0 in slot_getattr ()
#2  0x080c6c73 in FormIndexDatum ()
#3  0x080c6ef1 in IndexBuildHeapScan ()
#4  0x0809b44d in btbuild ()
#5  0x0825dfdd in OidFunctionCall3 ()
#6  0x080c4f95 in index_build ()
#7  0x080c68eb in index_create ()
#8  0x08117e36 in DefineIndex ()
#9  0x081db4ee in ProcessUtility ()
#10 0x081d8449 in PostgresMain ()
#11 0x081d99d5 in PortalRun ()
#12 0x081d509e in pg_parse_query ()
#13 0x081d6c33 in PostgresMain ()
#14 0x081aae91 in ClosePostmasterPorts ()
#15 0x081ac14c in PostmasterMain ()
#16 0x08168f22 in main ()

--
Daniel

Re: [SQL] PostgreSQL server terminated by signal 11

От
Tom Lane
Дата:
"Daniel Caune" <daniel.caune@ubisoft.com> writes:
> Program received signal SIGSEGV, Segmentation fault.
> 0x08079e2a in slot_attisnull ()
> (gdb) bt
> #0  0x08079e2a in slot_attisnull ()
> #1  0x0807a1d0 in slot_getattr ()
> #2  0x080c6c73 in FormIndexDatum ()
> #3  0x080c6ef1 in IndexBuildHeapScan ()
> #4  0x0809b44d in btbuild ()
> #5  0x0825dfdd in OidFunctionCall3 ()
> #6  0x080c4f95 in index_build ()
> #7  0x080c68eb in index_create ()
> #8  0x08117e36 in DefineIndex ()

Hmph.  gdb is lying to you, because slot_getattr doesn't call slot_attisnull.
This isn't too unusual in a non-debug build, because the symbol table is
incomplete (no mention of non-global functions).

Given that this doesn't happen right away, but only after it's been
processing for awhile, we can assume that FormIndexDatum has been
successfully iterated many times already, which seems to eliminate
theories like the slot or the keycol value being bogus.  I'm pretty well
convinced now that we're looking at a problem with corrupted data.  Can
you do a SELECT * FROM (or COPY FROM) the table without error?

            regards, tom lane