You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Danil Pismenny <da...@orionet.ru> on 2003/08/03 10:41:15 UTC

[mp2] segfault when connect to database


httpd2 2.0.47, mod_perl 1.99_09
------------------------------


httpd does segfault when I try to connect to the database (mysql or
interbase). It faults somewhere in libnss_db.so. It works well if I
remove libnss_db* from the system.

Here is the part of programm stack from core:

#0  0x00000000 in ?? ()
#1  0x4075de1e in db_open () from /lib/libnss_db.so.2
#2  0x4075ded0 in internal_setent () from /lib/libnss_db.so.2
#3  0x4075d62e in _nss_db_endservent () from /lib/libnss_db.so.2
#4  0x4075d8c3 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
#5  0x40358733 in __getservbyname_r (name=0x405a42f7 "mysql", 
    proto=0x405a42f3 "tcp", resbuf=0x4038bb7c, buffer=0x86a8a70 "", buflen=1024, 
    result=0xbffff148) at ../nss/getXXbyYY_r.c:200
#6  0x403585e1 in getservbyname (name=0x405a42f7 "mysql", proto=0x405a42f3 "tcp")
    at ../nss/getXXbyYY.c:145
#7  0x405949fb in mysql_once_init ()
   from /usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/mysql.so
#8  0x4059711b in mysql_init ()
   from /usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/mysql.so
#9  0x4058bf4a in mysql_dr_connect ()




-- 
Danil Pismenny
http://www.orionet.ru/

Re: [mp2] segfault when connect to database

Posted by Stas Bekman <st...@stason.org>.
Danil Pismenny wrote:
> 
> httpd2 2.0.47, mod_perl 1.99_09
> ------------------------------
> 
> 
> httpd does segfault when I try to connect to the database (mysql or
> interbase). It faults somewhere in libnss_db.so. It works well if I
> remove libnss_db* from the system.
> 
> Here is the part of programm stack from core:
> 
> #0  0x00000000 in ?? ()
> #1  0x4075de1e in db_open () from /lib/libnss_db.so.2
> #2  0x4075ded0 in internal_setent () from /lib/libnss_db.so.2
> #3  0x4075d62e in _nss_db_endservent () from /lib/libnss_db.so.2
> #4  0x4075d8c3 in _nss_db_getservbyname_r () from /lib/libnss_db.so.2
> #5  0x40358733 in __getservbyname_r (name=0x405a42f7 "mysql", 
>     proto=0x405a42f3 "tcp", resbuf=0x4038bb7c, buffer=0x86a8a70 "", buflen=1024, 
>     result=0xbffff148) at ../nss/getXXbyYY_r.c:200
> #6  0x403585e1 in getservbyname (name=0x405a42f7 "mysql", proto=0x405a42f3 "tcp")
>     at ../nss/getXXbyYY.c:145
> #7  0x405949fb in mysql_once_init ()
>    from /usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/mysql.so
> #8  0x4059711b in mysql_init ()
>    from /usr/lib/perl5/site_perl/i386-linux/auto/DBD/mysql/mysql.so
> #9  0x4058bf4a in mysql_dr_connect ()

Can you try reproducing the problem with an external program and then mod_cgi? 
  I don't see where mod_perl is involved here.

Thanks!

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [mp2] segfault when connect to database

Posted by Stas Bekman <st...@stason.org>.
Marc M. Adkins wrote:
>>httpd2 2.0.47, mod_perl 1.99_09
>>------------------------------
>>httpd does segfault when I try to connect to the database (mysql or
>>interbase). It faults somewhere in libnss_db.so. It works well if I
>>remove libnss_db* from the system.
> 
> 
> I noticed a while back that when I use PostgreSQL/W2K/2.0.46/mp1.99_10 I get
> a segfault _when Apache shuts down_.  I don't have it compiled such that I
> can do a backtrace.

So it can't be fixed until we can see the backtrace and be able to reproduce it.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: [mp2] segfault when connect to database

Posted by "Marc M. Adkins" <mm...@Doorways.org>.
> httpd2 2.0.47, mod_perl 1.99_09
> ------------------------------
> httpd does segfault when I try to connect to the database (mysql or
> interbase). It faults somewhere in libnss_db.so. It works well if I
> remove libnss_db* from the system.

I noticed a while back that when I use PostgreSQL/W2K/2.0.46/mp1.99_10 I get
a segfault _when Apache shuts down_.  I don't have it compiled such that I
can do a backtrace.

mma