I have inherited a solution made up of an HP w/apache 1.3.26 and modperl
1.3.?? config.
The modperl makes some C calls.  One of the C calls spawns 2 pthreads.
Seems when the apache process gets a signal to terminate it cores upon exit.
If I do not spawn the two threads things seem much more stable.  i even made
sure the 2 pthreads mask out all signals.  (I have to spawn these threads,
it was just a test).

The odd thing is that stack trace in the core shows that the main
thread (1), is now one of the spawned threads, and the main thread is
thread 3.  I actually have one core where 2 threads stack traces go
up to main.  Seems apache is hijacking threads and strange things are  going
on.

Any ideas?  Are there certain things i should know or do in this
multi-threaded env or is it not supported?

Here is the stack of thread 3 of the core:

#0  0xc01ecb88 in kill () from /usr/lib/libc.2
#1  0x179254 in sig_coredump (sig=10) at
http_main.c:3081
#2  <signal handler called>
#3  0xc0175160 in free () from /usr/lib/libc.2
#4  0x1e3d70 in Perl_safesysfree ()
#5  0x1c1a40 in perl_destruct ()
#6  0x632b8 in perl_shutdown (s=0x400640b8,
p=0x409dec58) at
mod_perl.c:294
#7  0x684a8 in perl_child_exit (s=0x400640b8,
p=0x409dec58) at
mod_perl.c:958
#8  0x67cfc in perl_child_exit_cleanup
(data=0x409dee00 "@\006@\270@\235\354X@\235\356")
    at mod_perl.c:926
#9  0x15cf14 in run_cleanups (c=0x409dee08) at
alloc.c:1713
#10 0x15a060 in ap_clear_pool (a=0x409dec58) at
alloc.c:538
#11 0x15a190 in ap_destroy_pool (a=0x409dec58) at
alloc.c:568
#12 0x175690 in clean_child_exit (code=0) at
http_main.c:512
#13 0x1792dc in just_die (sig=1) at http_main.c:3109
#14 <signal handler called>



Reply via email to