httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Patch 20 and the scoreboard
Date Fri, 08 Dec 1995 18:53:21 GMT
I have been analysing patch 20 and the whole scoreboard handling system in
an attempt to understand this problem. I believe that I have found a number
of deficiencies, and perhaps an explanation of the problem.

The first thing to note is that patch 20 does nothing in terms of what will be
found in the scoreboard file. It does, however, modify the timing of things. It
delays the writing of SERVER_READY to the scoreboard. The fact that this causes
problems has all the hallmarks of a race condition. I believe that such a
condition does exist.

When a new child is spawned, it is only once the child reaches:

    update_child_status (child_num, SERVER_READY);

that any kind of mark is made in the scoreboard. Patch 20 delays this by
first reopening the scoreboard. New children are spawned according to how
many are marked as SERVER_READY. Presumably, in a heavily-loaded system, this
can take longer than the 1 second it takes for the main server to go round
its loop. At this point, all sorts of havoc ensues, as the same scoreboard
slot is reused for the next child forked.

Note that reversing patch 20 does _not_ fix this bug, it merely means that
the server must be more heavily loaded before it will occur.

I will submit a patch which cures this, and other deficiencies of the
scoreboard, shortly. However, I can't test it beyond the most basic

Sigh. I was looking forward to an early supper.



Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant        Fax:   +44 (181) 994 6472
and Technical Director      Email:
A.L. Digital Ltd,           URL:
London, England.

View raw message