SIGSEGV in Postgres 8.0.3 (libpq4)

From: Anand Kumria <wildfire(at)progsoc(dot)uts(dot)edu(dot)au>
To: pgsql-bugs(at)postgresql(dot)org
Subject: SIGSEGV in Postgres 8.0.3 (libpq4)
Date: 2005-10-18 22:45:25
Message-ID: 20051018224525.GA5502@progsoc.uts.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

I have a set of perl scripts which invoke each other (via system());
eventually I found that they were crashing and ultimately causing Perl
to SIGSEGV.

I am using Debian testing and have recompiled postgres-8.0.3-15 to
include debugging symbols. This is a dual-CPU dual-stacked IPv4/IPv6
host running Linux 2.4.22.

From what I have been able to determine the problem is in libpq4 (and
I've only observed it occuring with IPv6 addresses).

Starting program: /usr/bin/perl ./add_address 265 2001:502:d399:0:0:0:0:44
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 8523)]
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 8523)]
r0x4038275b in pqGetc (
result=0xbfffee0b
"@\220\0239(at)�\023\034@�\023\034(at)8����\0058@�\023\034(at)��/\b�����\0058(at)\004\235\034\b\220\0239@X���7\0178@",
conn=0x401c13d4)
at fe-misc.c:85
85 *result = conn->inBuffer[conn->inCursor++];
(gdb) bt
#0 0x4038275b in pqGetc (
result=0xbfffee0b
"@\220\0239(at)�\023\034@�\023\034(at)8����\0058@�\023\034(at)��/\b�����\0058(at)\004\235\034\b\220\0239@X���7\0178@",
conn=0x401c13d4)
at fe-misc.c:85
#1 0x40388543 in pqParseInput3 (conn=0x401c13d4) at fe-protocol3.c:80
#2 0x403805f4 in parseInput (conn=Variable "conn" is not available.
) at fe-exec.c:1097
#3 0x40380f37 in PQgetResult (conn=0x401c13d4) at fe-exec.c:1171
#4 0x403812e4 in PQexecStart (conn=0x401c13d4) at fe-exec.c:1315
#5 0x40381532 in PQexec (conn=0x401c13d4,
query=0x82fada8 "DEALLOCATE dbdpg_2") at fe-exec.c:1223
#6 0x40367459 in _result () from /usr/lib/perl5/auto/DBD/Pg/Pg.so
#7 0x4036da35 in dbd_st_deallocate_statement ()
from /usr/lib/perl5/auto/DBD/Pg/Pg.so
#8 0x4036dfe8 in dbd_st_destroy () from
/usr/lib/perl5/auto/DBD/Pg/Pg.so
#9 0x40360784 in XS_DBD__Pg__st_DESTROY ()
from /usr/lib/perl5/auto/DBD/Pg/Pg.so
#10 0x40342e65 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so
#11 0x080c4386 in Perl_pp_entersub ()
#12 0x080644dc in Perl_call_sv ()
#13 0x080642b1 in Perl_call_sv ()
#14 0x080ccc55 in Perl_sv_clear ()
#15 0x080cd420 in Perl_sv_free ()
#16 0x080cce19 in Perl_sv_clear ()
#17 0x080cd420 in Perl_sv_free ()
#18 0x080b0a1f in Perl_mg_free ()
#19 0x080cd1ba in Perl_sv_clear ()
#20 0x080cd420 in Perl_sv_free ()
#21 0x080c56f4 in Perl_sv_add_arena ()
#22 0x080c5876 in Perl_sv_clean_objs ()
#23 0x0806202d in perl_destruct ()
#24 0x0805fde0 in main ()
(gdb)

I am happy to try out any patches, etc., however I am not on the mailing
list, so please CC: any replies to me.

Thanks,
Anand

--
`When any government, or any church for that matter, undertakes to say to
its subjects, "This you may not read, this you must not see, this you are
forbidden to know," the end result is tyranny and oppression no matter how
holy the motives' -- Robert A Heinlein, "If this goes on --"

----- End forwarded message -----

--
`When any government, or any church for that matter, undertakes to say to
its subjects, "This you may not read, this you must not see, this you are
forbidden to know," the end result is tyranny and oppression no matter how
holy the motives' -- Robert A Heinlein, "If this goes on --"

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-19 02:16:54 Re: Fwd: BUG #1972: index error with space character
Previous Message Devrim GUNDUZ 2005-10-18 20:18:04 Re: BUG #1970: Existing /etc/pam.d/postgresql clobbered by