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=0xbffff954) at > > http_main.c:4469 > > #10 0x8060093 in main (argc=4, argv=0xbffff954) at http_main.c:4830 > > #11 0x400b7cb3 in __libc_start_main (main=0x805fd5c <main>, argc=4, > > argv=0xbffff954, init=0x804e890 <_init>, fini=0x8093d6c <_fini>, > > rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff94c) > > 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 returned -1 running 1 server configured stacked handlers for /... calling &{PerlTransHandler->[0]} (1 total) mod_perl: saving SIGALRM (14) handler 0x808a030 mod_perl_dir_env: PERLDB_OPTS=`NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2'PerlPassEnv: `PERLDB_OPTS'=`NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2' mod_perl: inc seqno to 1 for / Apache::UriHandler symbol table not found, loading... loading perl module 'Apache::UriHandler'...ok checking if `handler' is a method...no perl_call: defaulting to Apache::UriHandler::handler blessing request_rec=(0x852943c) perl_call_handler: SVs = 23903, OBJs = 7 &{PerlTransHandler->[0]} returned status=-1 `PerlTransHandler' push_handlers() stack is empty PerlTransHandler handlers returned -1 `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlHeaderParserHandler' push_handlers() stack is empty PerlHeaderParserHandler handlers returned -1 `PerlAccessHandler' push_handlers() stack is empty PerlAccessHandler handlers returned -1 `PerlTypeHandler' push_handlers() stack is empty PerlTypeHandler handlers returned -1 `PerlFixupHandler' push_handlers() stack is empty PerlFixupHandler handlers returned -1 perl_handler ENTER: SVs = 23903, OBJs = 7 tie *STDOUT => Apache blessing request_rec=(0x852943c) tie *STDIN => Apache blessing request_rec=(0x852943c) running 1 server configured stacked handlers for /index.perl... calling &{PerlHandler->[0]} (1 total) perl_setup_env...28 keys perl_call: trying method lookup on `handler' in class `Apache::Registry'...found checking if `handler' is a method...no perl_call: defaulting to Apache::Registry::handler blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) registering PerlCleanupHandler blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) perl_call_handler: SVs = 24435, OBJs = 9 &{PerlHandler->[0]} returned status=0 `PerlHandler' push_handlers() stack is empty PerlHandler handlers returned 0 perl_handler LEAVE: SVs = 24435, OBJs = 9 running 1 server configured stacked handlers for /index.perl... calling &{PerlLogHandler->[0]} (1 total) Apache::LogDBI symbol table not found, loading... loading perl module 'Apache::LogDBI'...ok checking if `handler' is a method...no perl_call: defaulting to Apache::LogDBI::handler blessing request_rec=(0x852943c) perl_call_handler: SVs = 25426, OBJs = 18 &{PerlLogHandler->[0]} returned status=0 `PerlLogHandler' push_handlers() stack is empty PerlLogHandler handlers returned 0 running registered cleanup handlers... perl_call: handler is a cached CV blessing request_rec=(0x852943c) perl_call_handler: SVs = 25426, OBJs = 18 `PerlCleanupHandler' push_handlers() stack is empty PerlCleanupHandler handlers returned -1 perl_end_cleanup...running 0 END blocks for /index.perl mod_perl: restoring SIG? (14) handler from: 0x808a030 to: 0x808a030 ok `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlPostReadRequestHandler' push_handlers() stack is empty PerlPostReadRequestHandler handlers returned -1 running 1 server configured stacked handlers for /search/65768427f0eb5a08... calling &{PerlTransHandler->[0]} (1 total) mod_perl: saving SIGALRM (14) handler 0x808a030 PerlPassEnv: `PERLDB_OPTS'=`NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2' mod_perl: inc seqno to 2 for /search/65768427f0eb5a08 blessing request_rec=(0x852943c) perl_call_handler: SVs = 25398, OBJs = 18 &{PerlTransHandler->[0]} returned status=-1 `PerlTransHandler' push_handlers() stack is empty PerlTransHandler handlers returned -1 `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlHeaderParserHandler' push_handlers() stack is empty PerlHeaderParserHandler handlers returned -1 `PerlAccessHandler' push_handlers() stack is empty PerlAccessHandler handlers returned -1 `PerlTypeHandler' push_handlers() stack is empty PerlTypeHandler handlers returned -1 `PerlFixupHandler' push_handlers() stack is empty PerlFixupHandler handlers returned -1 perl_handler ENTER: SVs = 25398, OBJs = 18 tie *STDOUT => Apache blessing request_rec=(0x852943c) tie *STDIN => Apache blessing request_rec=(0x852943c) running 1 server configured stacked handlers for /search/index.perl... calling &{PerlHandler->[0]} (1 total) perl_setup_env...29 keys blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) registering PerlCleanupHandler blessing request_rec=(0x852943c) blessing request_rec=(0x852943c) assertion botched (chunk's head overwrite?): ovp->ovu.ovu_rmagic == 0x55555555