perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Kremer <l...@funkreich.de>
Subject Segfault when connecting during Apache startup with Apache::DBI
Date Wed, 25 Jun 2008 09:05:13 GMT
We have a mod_perl application that needs to connect to the database during
Apache startup to prefetch some data. The database handle for this is not
stored or re-used in any way.

According to the documentation, Apache::DBI does not cache database connections
made during server startup, so I should be fine. Unfortunately as soon as I
uncomment the lines in my ApacheHandler that connect to the database during
startup the Apache children throw segmentation faults on subsequent requests.

AFAIK the connection made during startup is not supposed to clash with the
connections made on a per-child basis during the handler() method via
DBI->connect() because it never gets cached anyway. But it seems that exactly
that is happening (Apache::DBI correctly warns me with "skipping connection
during server startup, read the docu").

The system looks like this:

- Ubuntu Feisty with apache-perl.
- stock Ubuntu Perl 5.8.8 (which unfortunately comes with threads)
- self-rolled DBD::mysql (against libmysqlclient15-dev), DBI and Apache::DBI

Here's the gdb output for the coredump:

This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /usr/lib/libdb-4.4.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libdb-4.4.so
Reading symbols from /usr/lib/libperl.so.5.8...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libperl.so.5.8
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libexpat.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libexpat.so.1
Reading symbols from /lib/ld-linux.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/local/lib/perl/5.8.8/auto/Cwd/Cwd.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Cwd/Cwd.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/List/Util/Util.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/List/Util/Util.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Fcntl/Fcntl.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Fcntl/Fcntl.so
Reading symbols from /usr/lib/perl/5.8.8/auto/IO/IO.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/IO/IO.so
Reading symbols from /usr/lib/perl5/auto/HTML/Parser/Parser.so...done.
Loaded symbols for /usr/lib/perl5/auto/HTML/Parser/Parser.so
Reading symbols from /usr/lib/perl/5.8.8/auto/File/Glob/Glob.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/File/Glob/Glob.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Data/Dumper/Dumper.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Data/Dumper/Dumper.so
Reading symbols from /usr/lib/perl/5.8.8/auto/B/B.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/B/B.so
Reading symbols from
/usr/local/lib/perl/5.8.8/auto/Apache/Request/Request.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Apache/Request/Request.so
Reading symbols from /usr/lib/perl5/auto/Apache/Symbol/Symbol.so...done.
Loaded symbols for /usr/lib/perl5/auto/Apache/Symbol/Symbol.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/DBI/DBI.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/DBI/DBI.so
Reading symbols from /usr/lib/perl/5.8.8/auto/MIME/Base64/Base64.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/MIME/Base64/Base64.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/Digest/SHA/SHA.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Digest/SHA/SHA.so
Reading symbols from
/usr/local/lib/perl/5.8.8/auto/Apache/Cookie/Cookie.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Apache/Cookie/Cookie.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Sys/Hostname/Hostname.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Sys/Hostname/Hostname.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Socket/Socket.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Socket/Socket.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/Date/Calc/Calc.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Date/Calc/Calc.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/Digest/SHA1/SHA1.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/Digest/SHA1/SHA1.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Storable/Storable.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Storable/Storable.so
Reading symbols from /usr/lib/perl/5.8.8/auto/Digest/MD5/MD5.so...done.
Loaded symbols for /usr/lib/perl/5.8/auto/Digest/MD5/MD5.so
Reading symbols from /usr/local/lib/perl/5.8.8/auto/DBD/mysql/mysql.so...done.
Loaded symbols for /usr/local/lib/perl/5.8.8/auto/DBD/mysql/mysql.so
Reading symbols from /usr/lib/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/libnss_mdns4_minimal.so.2...done.
Loaded symbols for /lib/libnss_mdns4_minimal.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/apache/1.3/mod_log_config.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_log_config.so
Reading symbols from /usr/lib/apache/1.3/mod_mime_magic.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_mime_magic.so
Reading symbols from /usr/lib/apache/1.3/mod_mime.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_mime.so
Reading symbols from /usr/lib/apache/1.3/mod_dir.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_dir.so
Reading symbols from /usr/lib/apache/1.3/mod_alias.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_alias.so
Reading symbols from /usr/lib/apache/1.3/mod_rewrite.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_rewrite.so
Reading symbols from /usr/lib/apache/1.3/mod_access.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_access.so
Reading symbols from /usr/lib/apache/1.3/mod_setenvif.so...done.
Loaded symbols for /usr/lib/apache/1.3/mod_setenvif.so
Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
Core was generated by `/usr/sbin/apache-perl'.
Program terminated with signal 11, Segmentation fault.
#0  0xb775a89b in mysql_ping () from /usr/lib/libmysqlclient.so.15

So it fails during the call to mysql_ping() but I can't see why this is
happening.

Any ideas?

Thanks!

--Tobias

Mime
View raw message