Hi.  I'm new here, and hoping someone can help me.  I've installed the
latest -current version of OpenBSD, and loaded mod_perl as a DSO.  That gets
me Apache 1.3.27, Perl 5.8.0, and mod_perl 1.27.

Apache starts fine, but when I try to access any script that does
DBI->connect(...), it generates a segfault:

[Thu Feb 20 14:52:09 2003] [notice] child pid 29135 exit signal Segmentation fault (11)

This happens with DBI versions 1.28, 1.30, and 1.32.  It happens when DBI is
in Pure Perl mode or in XS mode with DBD::mysql, DBD::mysqlPP, DBD::Pg, and
DBD::PgPP.

It only happens when DBI is pulled in at server startup, though.  Either
through 'PerlModule DBI' or 'perlrequire startup.perl' and 'use DBI' in
startup.perl.  I can load other modules (like CGI.pm) at server startup just
fine.

The same thing happens if I use 'PerlModule SomethingElse' where
SomethingElse has a 'use DBI' in it.

I'm at my wit's end, so any help would be greatly appreciated.  I've pased a
backtrace from 'httpd -X' and the script I've been using to test.

Thanks in advance for any help.

-Dan

----
These are taken using DBD::mysql.  I'd be happy to provide backtraces using
other modules if they'd be useful to someone debugging.

before loading sharedlibrary symbols:

(gdb) bt
#0  0x403ea000 in ?? () from 
/usr/local/libdata/perl5/site_perl/i386-openbsd/auto/DBD/mysql/mysql.so
#1  0x40337fe5 in ?? () from /usr/lib/libperl.so.8.0
#2  0x40380041 in ?? () from /usr/lib/libperl.so.8.0
#3  0x403627d0 in ?? () from /usr/lib/libperl.so.8.0
#4  0x4036255a in ?? () from /usr/lib/libperl.so.8.0
#5  0x402b4ada in ?? () from /usr/lib/apache/modules/mod_perl.so
#6  0x402b3e8d in ?? () from /usr/lib/apache/modules/mod_perl.so
#7  0x402b1a2b in ?? () from /usr/lib/apache/modules/mod_perl.so
#8  0x49ca1 in ap_invoke_handler (r=0x6c5034) at http_config.c:520
#9  0x69d4c in process_request_internal (r=0x6c5034) at http_request.c:1308
#10 0x69db6 in ap_process_request (r=0x6c5034) at http_request.c:1324
#11 0x5c88b in child_main (child_num_arg=0) at http_main.c:4708
#12 0x5cab1 in make_child (s=0xd3034, slot=0, now=1045861707) at http_main.c:4832
#13 0x5cc2a in startup_children (number_to_start=20) at http_main.c:4914
#14 0x5d8a4 in standalone_main (argc=2, argv=0xcfbfd838) at http_main.c:5272
#15 0x5e298 in main (argc=2, argv=0xcfbfd838) at http_main.c:5639

and after

(gdb) bt
#0  0x403ea000 in end ()
#1  0x403f5d1d in boot_DBD__mysql (cv=0x704354) at mysql.xsi:18
#2  0x40337fe5 in Perl_pp_entersub ()
#3  0x40380041 in Perl_runops_standard ()
#4  0x403627d0 in Perl_call_sv ()
#5  0x4036255a in Perl_call_sv ()
#6  0x402b4ada in perl_call_handler (sv=0x28615c, r=0x6c5034, args=0x0) at 
mod_perl.c:1658
#7  0x402b3e8d in perl_run_stacked_handlers (hook=0x402af439 "PerlHandler", 
r=0x6c5034, handlers=0x284b9c) at mod_perl.c:1371
#8  0x402b1a2b in perl_handler (r=0x6c5034) at mod_perl.c:897
#9  0x49ca1 in ap_invoke_handler (r=0x6c5034) at http_config.c:520
#10 0x69d4c in process_request_internal (r=0x6c5034) at http_request.c:1308
#11 0x69db6 in ap_process_request (r=0x6c5034) at http_request.c:1324
#12 0x5c88b in child_main (child_num_arg=0) at http_main.c:4708
#13 0x5cab1 in make_child (s=0xd3034, slot=0, now=1045861707) at http_main.c:4832
#14 0x5cc2a in startup_children (number_to_start=20) at http_main.c:4914
#15 0x5d8a4 in standalone_main (argc=2, argv=0xcfbfd838) at http_main.c:5272
#16 0x5e298 in main (argc=2, argv=0xcfbfd838) at http_main.c:5639

----
#!/usr/bin/perl -w

use CGI;
use DBI;

use lib '/var/www/localsettings';
use Settings;

my $cgi = new CGI;
my $dbh = DBI->connect(@Settings::dbconnect);

print $cgi->header;

print <<EOT;
<html><head><title>foo</title><body>Connected</body></html>
EOT

exit 0;

-- 
"Burnished gallows set with red
 Caress the fevered, empty mind
 Of man who hangs bloodied and blind
 To reach for wisdom, not for bread."  -- Deoridhe Grimsdaughter

Reply via email to