Re: Segmentation fault while COPY in 7.3 - Mailing list pgsql-general
From | Bruce Momjian |
---|---|
Subject | Re: Segmentation fault while COPY in 7.3 |
Date | |
Msg-id | 200212030502.gB352rO17879@candle.pha.pa.us Whole thread Raw |
In response to | Re: Segmentation fault while COPY in 7.3 (Medi Montaseri <medi.montaseri@intransa.com>) |
Responses |
Re: Segmentation fault while COPY in 7.3
|
List | pgsql-general |
Yes, we found a double pfree in 7.3. There will be a fix in 7.3.1. --------------------------------------------------------------------------- Medi Montaseri wrote: > Something is funny about this pfree()....here is a similar crash on a 7.2.3 > > (gdb) > #0 0x00420874 in heap_freetuple () > #1 0x004a8390 in acquire_sample_rows () > #2 0x004a75c8 in analyze_rel () > #3 0x0049f690 in vacuum () > #4 0x005585d8 in ProcessUtility () > #5 0x00553c78 in pg_exec_query_string () > #6 0x00555850 in PostgresMain () > #7 0x00524660 in DoBackend () > #8 0x00523d08 in BackendStartup () > #9 0x00521c18 in ServerLoop () > #10 0x005211c8 in PostmasterMain () > #11 0x004df3d8 in main () > #12 0x2ae34928 in __libc_start_main () from /lib/libc.so.6 > (gdb) > > > > Nicolai Tufar wrote: > > >Help! > >Backend crashes on any COPY command I issue: > >PostgreSQL is 7.3 release, is compiled from sources. > >The message I get is: > > > >apb=# COPY maras2.mrk_yyn (bsvr_no, yyn_tur, yyn_no, yyn_syf, yyn_trh) TO > >stdout; > >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: Failed. > >!# > > > > > >The output of strace on backend is following: > > > ># strace -p 18883 > >recv(7, "QCOPY maras2.mrk_yyn (bsvr_no, y"..., 8192, 0) = 77 > >gettimeofday({1038713111, 629131}, NULL) = 0 > >_llseek(11, 0, [0], SEEK_SET) = 0 > >read(11, "\0\0\0\0\20\0\0\0\1\0\0\0\24\0\360\37\360\37\1 b1\5\0\1"..., 8192) > >= 8192 > >read(11, "\0\0\0\0x#\375\"\20\0\0\0008\0h\35\360\37\1 \370\235\220"..., > >8192) = 8192 > >_llseek(12, 0, [0], SEEK_SET) = 0 > >read(12, "\0\0\0\0\0#\375\"\20\0\0\0008\0@\34\0 \1 \200\237\0\1\0"..., 8192) > >= 8192 > >_llseek(21, 40960, [40960], SEEK_SET) = 0 > >read(21, "\0\0\0\0\4\251\3#\20\0\0\0004\4p\17\360\37\1 \340\237 "..., 8192) > >= 8192 > >_llseek(22, 106496, [106496], SEEK_SET) = 0 > >read(22, "\0\0\0\0(\326\377\"\20\0\0\0\10\1\200\1\0 \1 \200\237\0"..., 8192) > >= 8192 > >read(17, "\0\0\0\0\20\0\0\0\1\0\0\0\360\0\20\1\0 \1 p\237 \1\340"..., 8192) > >= 8192 > >open("/data/pgsql/base/2015749/2015757", O_RDWR|O_LARGEFILE) = 39 > >_llseek(39, 0, [20037632], SEEK_END) = 0 > >_llseek(39, 0, [0], SEEK_SET) = 0 > >read(39, "\0\0\0\0\270\7\4#\20\0\0\0\300\1\350\1\0 \1 \270\237\216"..., > >8192) = 8192 > >--- SIGSEGV (Segmentation fault) --- > >+++ killed by SIGSEGV +++ > ># > > > >I have recompiled postgres with debug information enabled, run gdb, attached > >to backend process > >and caught SIGSEGV as following: > > > >(gdb) continue > >Continuing. > > > >Program received signal SIGSEGV, Segmentation fault. > >0x081697bf in pfree (pointer=0x828a7b0) at mcxt.c:480 > >480 (*header->context->methods->free_p) (header->context, > >pointer); > >(gdb) > > > > > >The output of bt is: > > > >(gdb) bt > >#0 0x081697bf in pfree (pointer=0x828a7b0) at mcxt.c:480 > >#1 0x080b37be in CopyTo (rel=0x402be088, attnumlist=0x828a3f8, binary=0 > >'\0', oids=0 '\0', > > fp=0x0, delim=0x81c2a57 "\t", null_print=0x81b2c22 "\\N") at copy.c:671 > >#2 0x080b32f6 in DoCopy (stmt=0x827b398) at copy.c:491 > >#3 0x08118a6a in pg_exec_query_string (query_string=0x827af48, dest=Remote, > > parse_context=0x8245378) at postgres.c:789 > >#4 0x08119b89 in PostgresMain (argc=4, argv=0xbfffd2a0, username=0x8240a81 > >"postgres") > > at postgres.c:2016 > >#5 0x08101d7c in DoBackend (port=0x8240950) at postmaster.c:2293 > >#6 0x081016c2 in BackendStartup (port=0x8240950) at postmaster.c:1915 > >#7 0x08100875 in ServerLoop () at postmaster.c:1000 > >#8 0x08100326 in PostmasterMain (argc=1, argv=0x82270c0) at > >postmaster.c:779 > >#9 0x080debab in main (argc=1, argv=0xbfffdc34) at main.c:210 > >#10 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6 > >(gdb) > > > > > > > >Thanks in advance, > >Nic > > > > > >---------------------------(end of broadcast)--------------------------- > >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
pgsql-general by date: