https://issues.apache.org/bugzilla/show_bug.cgi?id=49058
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
AssignedTo: [email protected]
ReportedBy: [email protected]
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
listeners.
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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]