Segmentation fault while COPY in 7.3 - Mailing list pgsql-general
From | Nicolai Tufar |
---|---|
Subject | Segmentation fault while COPY in 7.3 |
Date | |
Msg-id | 00ff01c298ed$1c0eac70$8016a8c0@apb.com.tr Whole thread Raw |
Responses |
Re: Segmentation fault while COPY in 7.3
Re: Segmentation fault while COPY in 7.3 |
List | pgsql-general |
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
pgsql-general by date: