Thread: pg_dump dumping... core
Hi all, It seems my message from yesterday did'nt get thru.. pg_dump is crashing on 1 database here. FWIW, it's the only that doesn't belong to me (superuser) Also it's SQL ASCII and has french local characters, I doubt this is the problem because I have plenty of databases like that. I've arrange to recompile with debug on and here's the stack trace. This is on unixware 7 Please help TIA. Script started on Thu Apr 24 16:18:36 2003 $ debug -c /tmp/core.* /usr/local/pgsql/bin/pg_dump Core image of pg_dump (process p1) created CORE FILE [flushsmall in malloc.c] SIGNALED 11 (segv code[SEGV_MAPERR] address[0x80b8004]) in p1 0xbffa3dd0 (flushsmall+320:) movl (%esi),%eax debug> stack Stack Trace for p1, Program pg_dump *[0] flushsmall(presumed: 0x80b6a84, 0xbfffdc20, 0x80b65d4) [0xbffa3dd0][1] bgalloc(0x808) [0xbffa4aa1][2] realloc(0x80b65d8,0x800) [0xbffa716b][3] enlargePQExpBuffer(str=0x80b6ae0, needed=1025) [pqexpbuffer.c@149][4] appendPQExpBufferChar(str=0x80b6ae0,ch=42 (or '*')) [pqexpbuffer.c@276][5] appendStringLiteral(buf=0x80b6ae0Warning: Formattedprint string too long, truncated , str="**************/\r\n/* Cr\351\351 le 19/03/2003 */\r\n/*lp\v\bte dtp\v\b...",escapeAll=0) [dumputils.c@130][6] dumpOneFunc(fout=0x806d9b0, finfo=0x8074e00) [pg_dump.c@3718][7] dumpFuncs(fout=0x806d9b0,finfo=0x8074dd8, numFuncs=27) [pg_dump.c@3551][8] dumpSchema(fout=0x806d9b0, numTablesPtr=0x8047280,aclsSkip=0, schemaOnly=0, dataOnly=0) [common.c@162][9] main(argc=4, argv=0x80472c4, 0x80472d8) [pg_dump.c@585][10] _start() [0x8049f7c] debug> quit script done on Thu Apr 24 16:19:45 2003 -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: ohp@pyrenet.fr ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery)
ohp@pyrenet.fr writes: > pg_dump is crashing on 1 database here. Judging from the backtrace, malloc's data structures have gotten corrupted, probably as a result of somebody scribbling on a few more bytes than their buffer would hold. Since we haven't seen other reports of similar problems, I'm leaning to the theory that it's a platform-specific problem. In particular I wonder whether you might have a buggy version of vsnprintf(). I have seen Solaris 7's vsnprintf() overrun its output buffer --- could Unixware's have the same bug? It'd be worth trying the workaround outlined in FAQ_Solaris (add snprintf.o to LIBOBJS and rebuild libpq.so), just to see if it makes any difference. If not, you're in for some tedious debugging to try to figure out exactly where the culprit is :-( regards, tom lane
Thanks for your reply Tom, For me to do it ASAP, would you please give me the way to do it? Many thanks, I'll let you know as soon as I try. On Thu, 24 Apr 2003, Tom Lane wrote: > Date: Thu, 24 Apr 2003 10:57:25 -0400 > From: Tom Lane <tgl@sss.pgh.pa.us> > To: ohp@pyrenet.fr > Cc: pgsql-hackers list <pgsql-hackers@postgresql.org> > Subject: Re: [HACKERS] pg_dump dumping... core > > ohp@pyrenet.fr writes: > > pg_dump is crashing on 1 database here. > > Judging from the backtrace, malloc's data structures have gotten > corrupted, probably as a result of somebody scribbling on a few more > bytes than their buffer would hold. > > Since we haven't seen other reports of similar problems, I'm leaning > to the theory that it's a platform-specific problem. In particular > I wonder whether you might have a buggy version of vsnprintf(). I have > seen Solaris 7's vsnprintf() overrun its output buffer --- could > Unixware's have the same bug? > > It'd be worth trying the workaround outlined in FAQ_Solaris (add > snprintf.o to LIBOBJS and rebuild libpq.so), just to see if it makes > any difference. If not, you're in for some tedious debugging to try > to figure out exactly where the culprit is :-( > > regards, tom lane > -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: ohp@pyrenet.fr ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery)
PLEASE discard my previous mail. I tried append snprintf.o to LIBSOBJ and it did'nt change a thing; crash at the same place. I feel bad!! On Thu, 24 Apr 2003, Tom Lane wrote: > Date: Thu, 24 Apr 2003 10:57:25 -0400 > From: Tom Lane <tgl@sss.pgh.pa.us> > To: ohp@pyrenet.fr > Cc: pgsql-hackers list <pgsql-hackers@postgresql.org> > Subject: Re: [HACKERS] pg_dump dumping... core > > ohp@pyrenet.fr writes: > > pg_dump is crashing on 1 database here. > > Judging from the backtrace, malloc's data structures have gotten > corrupted, probably as a result of somebody scribbling on a few more > bytes than their buffer would hold. > > Since we haven't seen other reports of similar problems, I'm leaning > to the theory that it's a platform-specific problem. In particular > I wonder whether you might have a buggy version of vsnprintf(). I have > seen Solaris 7's vsnprintf() overrun its output buffer --- could > Unixware's have the same bug? > > It'd be worth trying the workaround outlined in FAQ_Solaris (add > snprintf.o to LIBOBJS and rebuild libpq.so), just to see if it makes > any difference. If not, you're in for some tedious debugging to try > to figure out exactly where the culprit is :-( > > regards, tom lane > -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: ohp@pyrenet.fr ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery)
Hi all, I've been doing some more research on this: pg_dump -s works as expected pg_dump -a works as expected pg_dump -v shows that pg_dump crashes when dumping user defined functions. There's a lot (~30) plpsql functions how could it be a problem. I'm also surprised that pg_dump -s dumps those function without crashing. Regards On Thu, 24 Apr 2003, Tom Lane wrote: > Date: Thu, 24 Apr 2003 10:57:25 -0400 > From: Tom Lane <tgl@sss.pgh.pa.us> > To: ohp@pyrenet.fr > Cc: pgsql-hackers list <pgsql-hackers@postgresql.org> > Subject: Re: [HACKERS] pg_dump dumping... core > > ohp@pyrenet.fr writes: > > pg_dump is crashing on 1 database here. > > Judging from the backtrace, malloc's data structures have gotten > corrupted, probably as a result of somebody scribbling on a few more > bytes than their buffer would hold. > > Since we haven't seen other reports of similar problems, I'm leaning > to the theory that it's a platform-specific problem. In particular > I wonder whether you might have a buggy version of vsnprintf(). I have > seen Solaris 7's vsnprintf() overrun its output buffer --- could > Unixware's have the same bug? > > It'd be worth trying the workaround outlined in FAQ_Solaris (add > snprintf.o to LIBOBJS and rebuild libpq.so), just to see if it makes > any difference. If not, you're in for some tedious debugging to try > to figure out exactly where the culprit is :-( > > regards, tom lane > -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: ohp@pyrenet.fr ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery)