You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/03/21 23:09:57 UTC

Weird threaded MPM problem

Running 2.0 on AIX with the threaded MPM.  Start Apache as root. ps -ef | grep
httpd shows one process running as root and the remaining processes running as
nobody with a PPID of the parent process.  Fine so far. If I load the server
down, the PPID of some of the child processes change to 1. Weird. Any ideas on
what to look for in the code?

Bill


Re: Weird threaded MPM problem

Posted by Bill Stoddard <bi...@wstoddard.com>.
Okay, I understand what's happening, just need to give the fix a bit of
thought.  Skipping over the boring details, we are not handling the main
thread in child_main() correctly. When workers_may_exit is set, the child
worker threads are cleaned up, but the child_main() thread returns to
make_child() where it does nasty stuff!

Bill


Re: Weird threaded MPM problem

Posted by Bill Stoddard <bi...@wstoddard.com>.
Disabled mod_cgid and I still see the problem.

Bill

> "Bill Stoddard" <bi...@wstoddard.com> writes:
> 
> > Haven't fully debugged this yet, but it appears that a child process is
> > forking processses.  When the child dies, the PPID of the forked process
> > changes to 1.  Will spend some time this afternoon tracking this one
> > down.
> 
> Could it be mod_cgid perhaps?  Can you try it with mod_cgi instead?
> 
> I'm looking at a problem, unrelated I'm sure, where at termination
> mod_cgid sends SIGWINCH to the ppid (init==1).
> 
> -- 
> Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...
> 


Re: Weird threaded MPM problem

Posted by Jeff Trawick <tr...@bellsouth.net>.
"Bill Stoddard" <bi...@wstoddard.com> writes:

> Haven't fully debugged this yet, but it appears that a child process is
> forking processses.  When the child dies, the PPID of the forked process
> changes to 1.  Will spend some time this afternoon tracking this one
> down.

Could it be mod_cgid perhaps?  Can you try it with mod_cgi instead?

I'm looking at a problem, unrelated I'm sure, where at termination
mod_cgid sends SIGWINCH to the ppid (init==1).

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: Weird threaded MPM problem

Posted by Bill Stoddard <bi...@wstoddard.com>.
> "Bill Stoddard" <bi...@wstoddard.com> writes:
>
> > Running 2.0 on AIX with the threaded MPM.  Start Apache as root. ps -ef |
grep
> > httpd shows one process running as root and the remaining processes
running as
> > nobody with a PPID of the parent process.  Fine so far. If I load the
server
> > down, the PPID of some of the child processes change to 1. Weird. Any
ideas on
> > what to look for in the code?
>
> It seems that the proper parent process died, so the init process (pid
> == 1) became responsible for reaping status of the children.
>
> Run a syscall trace on the parent process and try to recreate the
> problem.  Maybe the parent segfaulted or didn't handle some signal or
> something.
>
> --
> Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:

Haven't fully debugged this yet, but it appears that a child process is
forking processses.  When the child dies, the PPID of the forked process
changes to 1.  Will spend some time this afternoon tracking this one down.

Bill



Re: Weird threaded MPM problem

Posted by Jeff Trawick <tr...@bellsouth.net>.
"Bill Stoddard" <bi...@wstoddard.com> writes:

> Running 2.0 on AIX with the threaded MPM.  Start Apache as root. ps -ef | grep
> httpd shows one process running as root and the remaining processes running as
> nobody with a PPID of the parent process.  Fine so far. If I load the server
> down, the PPID of some of the child processes change to 1. Weird. Any ideas on
> what to look for in the code?

It seems that the proper parent process died, so the init process (pid
== 1) became responsible for reaping status of the children.

Run a syscall trace on the parent process and try to recreate the
problem.  Maybe the parent segfaulted or didn't handle some signal or
something. 

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...