So I've been reading. I've actually then gone on to test it with a non-DSO
mod_perl and still get segfaults in the cleanup handling phase. I think
the two errors may be related. I'm attaching The output from
MOD_PERL_TRACE=all (had to set PERL_FREE=0 since it was giving way too
many error messages.
Hope this helps. This problem is really hampering my work at the moment.
Let me know if there's anything else I should try.
-Saar
On Tue, 14 Dec 1999, Doug MacEachern wrote:
mod_perl+dso is not a stable mix, try linking mod_perl static.
On Fri, 10 Dec 1999, Saar Picker wrote:
Hi,
After building apache with --shared-module=max and building mod_perl using
apxs, I get some strange behavior. I've also built my perl with -g
-DDEBUGGING.
On starting the web server, I get a bunch of "Bad free() ignored."
messages that seem to occur at the end of every block of perl code (ie.
scripts, loaded modules, etc.). Then the server segfaults. Using httpd -X
and gdb I've found that it cores when trying to do a dlclose() on the
mod_perl shared library.
Does anyone have an insights as to what might be happening? Backtrace
below.
Thanks,
-Saar Picker
Backtrace:
(gdb) bt
#0 0x401f4624 in ?? ()
#1 0x4009d0c0 in dlclose_doit (handle=0x80b5fb0) at dlclose.c:26
#2 0x4000a12b in _dl_catch_error (errstring=0x4009ed00,
operate=0x4009d0a8 dlclose_doit, args=0x80b5fb0) at dl-error.c:141
#3 0x4009d608 in _dlerror_run (operate=0x4009d0a8 dlclose_doit,
args=0x80b5fb0) at dlerror.c:122
#4 0x4009d08e in dlclose (handle=0x80b5fb0) at dlclose.c:32
#5 0x806f590 in ap_os_dso_unload (handle=0x80b5fb0) at os.c:130
#6 0x804f280 in unload_module (modi=0x80ad2d4) at mod_so.c:181
#7 0x805102e in run_cleanups (c=0x80ae05c) at alloc.c:1706
#8 0x804f85d in ap_clear_pool (a=0x80ad0dc) at alloc.c:531
#9 0x805f803 in standalone_main (argc=4, argv=0xb954) at
http_main.c:4469
#10 0x8060093 in main (argc=4, argv=0xb954) at http_main.c:4830
#11 0x400b7cb3 in __libc_start_main (main=0x805fd5c main, argc=4,
argv=0xb954, init=0x804e890 _init, fini=0x8093d6c _fini,
rtld_fini=0x4000a350 _dl_fini, stack_end=0xb94c)
at ../sysdeps/generic/libc-start.c:78
loading perl module 'Apache'...ok
perl_startup: perl aleady running...ok
loading perl module 'Apache'...ok
cleanup_av: SvREFCNT(0x81c8c14)==1
cleanup_av: SvREFCNT(0x819102c)==1
cleanup_av: SvREFCNT(0x819138c)==1
cleanup_av: SvREFCNT(0x8184ba4)==1
cleanup_av: SvREFCNT(0x8191074)==1
cleanup_av: SvREFCNT(0x8191020)==1
cleanup_av: SvREFCNT(0x81076c0)==1
cleanup_av: SvREFCNT(0x81076f0)==1
cleanup_av: SvREFCNT(0x81076d8)==1
loading perl module 'Apache'...ok
[Tue Dec 14 09:28:11 1999] [error] Cannot remove module mod_perl.c: not found in
module list
perl_cmd_warn: 1
perl_cmd_tainting: 1
perl_cmd_setenv: 'PERLDB_OPTS' = 'NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2'
loading perl module 'Apache'...ok
loading perl module 'Apache::DB'...ok
perl_cmd_fresh_restart: 0
perl_cmd_require: /usr/home/saarp/test/apache/perl/startup.pl
attempting to require `/usr/home/saarp/test/apache/perl/startup.pl'
init `PerlTransHandler' stack
perl_cmd_push_handlers: @PerlTransHandler, 'Apache::UriHandler'
pushing `Apache::UriHandler' into `PerlTransHandler' handlers
init `PerlLogHandler' stack
perl_cmd_push_handlers: @PerlLogHandler, 'Apache::LogDBI'
pushing `Apache::LogDBI' into `PerlLogHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Registry'
pushing `Apache::Registry' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::AXML'
pushing `Apache::AXML' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Logon'
pushing `Apache::Logon' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Logout'
pushing `Apache::Logout' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Error'
pushing `Apache::Error' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Error'
pushing `Apache::Error' into `PerlHandler' handlers
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::PlaySong'
pushing `Apache::PlaySong' into `PerlHandler' handlers
loading perl module 'Apache'...ok
`PerlRestartHandler' push_handlers() stack is empty
PerlRestartHandler handlers returned -1
[Tue Dec 14 09:28:11 1999] [info] created shared memory segment #545920
perl_init_ids: uid=99, euid=99, gid=99, egid=99
`PerlChildInitHandler' push_handlers() stack is empty
PerlChildInitHandler handlers returned -1
`PerlInitHandler' push_handlers() stack is empty
PerlInitHandler handlers returned -1
`PerlPostReadRequestHandler' push_handlers() stack is empty
PerlPostReadRequestHandler handlers