httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: bogus "Bad pid (%d) in scoreboard slot %d" messages when restarting 1.3
Date Fri, 26 Oct 2007 12:13:37 GMT

On Oct 26, 2007, at 7:32 AM, Jeff Trawick wrote:

> On 10/25/07, Jim Jagielski <jim@jagunet.com> wrote:
>> On Oct 25, 2007, at 11:00 AM, Jeff Trawick wrote:
>>
>>> I think this is the problem: When a child is reaped normally after
>>> exiting due to MaxSpareServers or MaxRequestsPerChild, it remains in
>>> the scoreboard with status set to SERVER_DEAD, and it is removed  
>>> from
>>> the pid table.
>>>
>>> Often that slot will be reused by a child created subsequently.
>>>
>>> If it is never reused before termination or hard restart,
>>> reclaim_child_processes() will see it in this code and complain that
>>> it isn't in the pid table:
>>
>> Yep... that appears to be it. When setting SERVER_DEAD we
>> aren't resetting the pid as well. Instead of working around
>> that, wouldn't the most straightforward approach be to
>> sync setting SERVER_DEAD status with also setting pid to 0?
>> This could be done in ap_update_child_status() which would
>> also hopefully address those file-based scoreboards as well.
>
> sure; I'm lacking cycles at the moment to start looking through the
> code for potential fallout; hope to start looking soon
>

I spent just a little bit of time, but the current code
has a mishmash of logic checking for pid == 0 or SERVER_DEAD
and sometimes both but not always. The constant assumption
is that a pid of 0 means no child. So from a cursory check,
this should be fixed anyway, and will also address the
current issue as well.

Mime
View raw message