Bug 501604 - xinetd can hang while processing unknown signal
xinetd can hang while processing unknown signal
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xinetd (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Vojtech Vitek
Depends On:
Blocks: 502912 590060 694820 697785
  Show dependency treegraph
Reported: 2009-05-19 19:51 EDT by Bryan Mason
Modified: 2015-03-04 18:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 694820 697785 (view as bug list)
Last Closed: 2011-05-25 04:39:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch proposed by Siddhesh Poyarekar (1.10 KB, patch)
2009-05-19 19:51 EDT, Bryan Mason
no flags Details | Diff

  None (edit)
Description Bryan Mason 2009-05-19 19:51:36 EDT
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):


How reproducible:

  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.
Actual results:

  xinetd hangs

Expected results:

  no hang

Additional info:

  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
  upstream maintainer.
Comment 3 RHEL Product and Program Management 2009-11-06 14:03:58 EST
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 "?".
Comment 13 errata-xmlrpc 2011-05-25 04:39:21 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.