Red Hat Bugzilla – Bug 501604
xinetd can hang while processing unknown signal
Last modified: 2015-03-04 18:56:39 EST
Created attachment 344727 [details]
Patch proposed by Siddhesh Poyarekar
Description of problem:
If a signal is sent to xinetd when xinetd is in the middle of
logging to syslog, xinetd could end up hung.
Version-Release number of selected component (if applicable):
Depends on timing, but can be reproduced reliably once the timing is
Steps to Reproduce:
1. kill -SIGHUP `pgrep xinetd` && sleep 0.001 && kill -SIGCONT `pgrep xinetd`
2. adjust the value of sleep until xinetd hangs. Values vary
from 0.001 to 0.2.
The core issue seems to be the msg() call within one of the signal
handlers. When signaled when within a msg() call the earlier
syslog_write() has already acquired a lock to write the previous
message to syslog. The current call then simply waits forever trying
to acquire that lock.
Proposed patch attached.
Patch has been proposed upstream as well. Awaiting feedback from
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.