www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject general/3352: race condition between graceful restart and child opening PID
Date Fri, 06 Nov 1998 02:09:04 GMT

>Number:         3352
>Category:       general
>Synopsis:       race condition between graceful restart and child opening PID
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Nov  5 18:10:00 PST 1998
>Originator:     marcs@znep.com
>Release:        1.3.3
Linux lerkim 2.1.107 #6 SMP Wed Sep 9 22:14:15 PDT 1998 i686 unknown

Should happen on all systems that use USE_FLOCK_SERIALIZED_ACCEPT
[Thu Nov  5 18:00:08 1998] [notice] SIGUSR1 received.  Doing graceful restart
[Thu Nov  5 18:00:08 1998] [emerg] (2)No such file or directory: Child cannot open lock file:
[Thu Nov  5 18:00:08 1998] [notice] Apache/1.3.3-dev (Unix) configured -- resuming normal

When the parent removes the lock file, new children that are still in the 
startup phase from a previous restart will get an error trying to open it.
ab -c 10 -t 60 http://server/ & ; while true; do apachectl graceful; done
This may or may not be something that needs fixing, but it could be indicative
of race conditions that could cause two processes to be in accept() on the
same socket at the same time due to locking the old file and the new file, possibly
causing problems on systems that can't handle such things.  This should be looked
at; I haven't verified if that can actually happen.

Special casing the code to not remove the file on a restart may or may not
be a possible solution.
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]

View raw message