Description of problem: The syslogd daemon can deadlock in ctime() call when set up to output MARK messages: In case a message is being logged, syslogd calls ctime() which locks a futex. If at the same moment also a MARK message alarm occurs, the ctime() is called again from the signal handler and the futex is never released which leads to a deadlock. Version-Release number of selected component (if applicable): sysklogd-1.4.1-26_EL How reproducible: Sometimes Steps to Reproduce: 1. Configure syslogd to output the MARK messages (e.g. by setting SYSLOGD_OPTIONS="-m1" in /etc/sysconfig/syslog) 2. Let the system run Actual results: syslogd hangs in ctime() call sometimes Expected results: no hang Additional info: This is a known problem which was fixed in sysklogd-1.4.1-28 (and therefore is not present in RHEL-5) -- see bug #152319.
Created attachment 336287 [details] Proposed patch Merge of patches for bug #152319 and bug #158205 (the former contained a regression).
Please be so kind and add a few key words to the technical note of this bugzilla entry using the following structure: Cause: Consequence: Fix: Result: For details, see: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Consequence: Fix: Result:
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1,10 @@ -Cause: +Cause: In case a message is being logged, syslogd calls ctime() which locks a futex. If at the same moment also a MARK message alarm occurs, the ctime() is called again from the signal handler and the futex is never released. Consequence: +deadlock Fix: +syslogd will no longer generate any I/O nor call ctime() within the signal handler -Result:+Result: +no deadlock
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. http://rhn.redhat.com/errata/RHBA-2011-0225.html