Bug 126223
Summary: | syslogd not handling -f option properly | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Jason Dixon <jason.dixon> | ||||
Component: | sysklogd | Assignee: | Jason Vas Dias <jvdias> | ||||
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3.0 | CC: | bugzilla, herrold, ptsekov, tao | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-04-20 00:09:27 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jason Dixon
2004-06-17 18:56:52 UTC
Created attachment 102368 [details]
patch to fix syslog
The problem appears to be the order in which syslog registers for SIGTERM and
forks. Currently syslogd forks a child and then registers for SIGTERM, which
the syslog child send to terminate the parent after the child has parsed the
config file. If the scheduler runs the child first, it is possible that the
child can send the SIGTERM before the parent register to receive it, causing
unknown exit codes to be given. This patch reverses that order, and resets the
child signal handler for SIGTERM to the default behavior.
wow, I was not paying attention when I wrote that last update. To clarify, currently syslog forks a child. The parent, upon return from fork, registers to catch SIGTERM, and then sleeps for 300 seconds. The child (which becomes the daemon process), returns from fork, parses the config file, and then sends a SIGTERM to the parent, to notify the parent that the child is running and configured. The problem is that sometimes the child can run before the parent. This means that its possible that the parent has not yet registered to receive SIGTERM when the child sends it. The result is unexpected exit codes from the parent, which lead to the problems described. My patch above reverses this order so that the parent is ready to receive the signal before the child is ever created. The child then resets its own signal table to preform the default action for SIGTERM after the fork. I was unable to duplicate this bug, but I agree there is a race condition here which may be found on multi-processor systems, and the patch can do no harm. Patch applied in sysklogd-1.4.1-22 . *** Bug 123906 has been marked as a duplicate of this bug. *** Patch works great, thanks! Upgraded from the base sysklogd package on RHAS 3, no problems at all. *** Bug 97078 has been marked as a duplicate of this bug. *** 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 the 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-2005-087.html |