httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49058] New: Prefork MPM tries to accept on closed listener sockets during graceful restarts
Date Tue, 06 Apr 2010 19:33:48 GMT

           Summary: Prefork MPM tries to accept on closed listener sockets
                    during graceful restarts
           Product: Apache httpd-2
           Version: 2.2.15
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: prefork

This happens intermittently but frequently on my system.  During graceful
restarts I see this message in the error log.

[notice] Graceful restart requested, doing restart
[error] (9)Bad file descriptor: apr_socket_accept:
(client socket)

The server restarts properly.

The error message is coming from unixd_accept() and apparently the chain of
events that leads to this is....

1. main server gets graceful restart signal.
2. main server signals child processes.
3. main server initiates dummy connections to wake children.
4. child wakes up for the dummy connection 
5. child gets signal for graceful restart and closes all of its listeners.
6. child comes back from apr_pollset_poll with the socket for the dummy
connection in pdesc.
7. child calls lr->accept_func() and fails with the error message

The main problem seems to be that right after returning from apr_pollset_poll()
in prefork.c, the child process has already set die_now and closed the

Somewhere between apr_pollset_poll() and "goto got_fd" the child process needs
to check die_now so that it doesn't attempt to accept on the closed socket.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message