Lukasz Engel <[EMAIL PROTECTED]> writes:

> Hello everybody,
> 
> It's my first deeper contact with apache sources (excluding
> "./configure; make; make install" ;) ).
> 
> I am trying to run apache 1.3.27 (with mod_perl and EAPI, but I think it
> doesn't matter) on Try64 5.1 box and  I got SEGVs (every time from the
> same place). 
> After some tracing  I think I found the problem:
> 
> While reading client's request line SIGALRM accurs (meaning some timeout
> - I don't know exactly). Then in signal handler (in function timeout
> (http_main.c)) longjmp to mail loop is done and apache continues
> processing.
> But on my Tru64 I can see that signal handler for SIGALRM is called in
> different thread (created implicit by libc ?).

I've seen this before with threaded 3rd party modules.  Apache 1.3 is
not designed to work in such an environment without special
precautions.

Any thread other than the thread Apache runs on (call it "main
thread") must block SIGALRM and any other non-synchronous signals used
by Apache.  Apache is written to assume that its signal handlers will
run on the main thread.

If you have 3rd party modules loaded, the maintainers need to make
sure they follow this rule.  If you don't have 3rd party modules
loaded and it really is a system library creating a thread with
inappropriate signal mask (maybe because Apache links against
libpthread to pick up support for cross-process pthread mutexes?), you
may need to experiment with which libraries are linked to avoid this
behavior.

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...

Reply via email to