On 06/01/2007 05:42 PM, jim@apache.org wrote:
> Author: jim
> Date: Fri Jun  1 08:42:57 2007
> New Revision: 543511
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=543511
> Log:
> Add in parent process PID table, to provide for
> a check against the pid values located in the
> scoreboard.
>
> Modified:
>     httpd/httpd/branches/1.3.x/src/main/http_main.c
>
 
I tried out the code in apache-1.3_20070603161656.tar.gz on TPF because I
thought the pid_table stuff might affect the platform.
 
I found some problems in main/http_main.c on both Linux and TPF:
 
1)  The new snprintf calls need to be changed to ap_snprintf for it to
compile on TPF (and possibly other platforms without a native snprintf).
 
2)  For both Linux and TPF, idle server maintenance can cause "Bad pid in
scoreboard slot" errors:
 
I tied up several children with requests and then let them time out so
they'd become idle.
(I lowered MinSpareServers to 1 and MaxSpareServers to 3 so it was easy to
reach the limits.)
This hit the kill(pid, SIG_TIMEOUT_KILL) and kill(pid, SIG_IDLE_KILL) code
in perform_idle_server_maintenance.
Those same pids showed up later in "Bad pid in scoreboard slot" errors.
 
3)  For both Linux and TPF, "Bad pid in scoreboard slot" errors can loop:
 
I hit this with issue #2 above but presumably you could get it on any
in_pid_table error where that scoreboard slot is hit again at a later
time...
 
I got looping error messages if the idle child that initially cause the
"Bad pid ..." error was the one that perform_idle_server_maintenance was
trying to get rid of.
An in_pid_table() error writes to the log but leaves the scoreboard slot
as-is.
So when we come through perform_idle_server_maintenance the next time, the
same error is logged for the same slot and pid.
Again, and again.
 
Hopefully this is enough information to recreate the issues.
If I left something out please let me know.
 
-David McCreedy