Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 4432
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: vivek [...] khera.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.31
Fixed in: 1.22



Subject: core dump under mod_perl
DBD::Pg 1.31, perl 5.8.2, mod_perl 1.29, apache 1.3.29 (with mod_ssl), FreeBSD 4.9, Postgres 7.4 libraries talking to a 7.2.4 server. I upgraded from DBD::Pg 1.22 to 1.31, and now the httpd dumps core when started. My httpd startup queries the database for some configuration information for the application, and this is where it croaks according to gdb: #0 0x285b5f4b in dbd_st_fetch () from /usr/local/lib/perl5/site_perl/5.8.2/mach/auto/DBD/Pg/Pg.so For now I'm backing to DBD::Pg 1.22 which has been stable. Standalone apps still work fine with DBD::Pg 1.31, however. I'll attempt to reproduce the environment and error on a development box with debugging on, and provide some more info.
[guest - Wed Nov 19 14:15:18 2003]: Show quoted text
> DBD::Pg 1.31, perl 5.8.2, mod_perl 1.29, apache 1.3.29 (with > mod_ssl), FreeBSD 4.9, Postgres 7.4 libraries talking to a 7.2.4 > server. > > I upgraded from DBD::Pg 1.22 to 1.31, and now the httpd dumps core > when started. My httpd startup queries the database for some > configuration information for the application, and this is where it > croaks according to gdb: > > #0 0x285b5f4b in dbd_st_fetch () > from /usr/local/lib/perl5/site_perl/5.8.2/mach/auto/DBD/Pg/Pg.so > > For now I'm backing to DBD::Pg 1.22 which has been stable. Standalone > apps still work fine with DBD::Pg 1.31, however. > > I'll attempt to reproduce the environment and error on a development > box with debugging on, and provide some more info.
There was a tiny problem with unknown field types causing DBD::Pg to segfault. The attached patch should fix it. This is also fixed in CVS HEAD. Rudy
Index: dbdimp.c =================================================================== RCS file: /usr/local/cvsroot/dbdpg/dbdpg/dbdimp.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- dbdimp.c 27 Oct 2003 19:57:02 -0000 1.32 +++ dbdimp.c 21 Nov 2003 18:57:11 -0000 1.33 @@ -1,6 +1,6 @@ /* - $Id: dbdimp.c,v 1.32 2003/10/27 19:57:02 rlippan Exp $ + $Id: dbdimp.c,v 1.33 2003/11/21 18:57:11 rlippan Exp $ Copyright (c) 2002,2003 PostgreSQL Global Development Group Copyright (c) 1997,1998,1999,2000 Edmund Mergl @@ -1036,7 +1036,9 @@ sv_setpvn(sv, value, value_len); - if ((type_info->type_id == BPCHAROID) && chopblanks) { + if (type_info && (type_info->type_id == BPCHAROID) && + chopblanks) + { p = SvEND(sv); len = SvCUR(sv); while(len && *--p == ' ')