Bug 163484
Summary: | crond doesn't initialise SIGPIPE handler | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Kjetil T. Homme <kjetilho> |
Component: | vixie-cron | Assignee: | Marcela Mašláňová <mmaslano> |
Status: | CLOSED DEFERRED | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | CC: | jvdias, t.h.amundsen |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-10-30 09:49:06 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: |
Description
Kjetil T. Homme
2005-07-18 08:32:20 UTC
I've read bug 146849 and bug 163483 as you suggested. The root cause of the problem seems to be RPM running its %post scripts with "trap '' PIPE": " in ./rpmdb/rpmdb.c, SIGPIPE is set to be ignored before opening the RPM database. it is not reset until the database has been closed. in the meantime, some packages will spawn scripts to do pre- or post-install, and these will inherit the SIGPIPE setting. in our case, this is crond, which in turn is passing it on to its children. " Because RPM is running 'service crond restart' after an vixie-cron update with SIGPIPE set to SIG_IGN, the problems in bug 146849 occur unless vixie-cron is restarted normally - correct ? I don't think vixie-cron should disable all inherited signal handlers by default - perhaps someone might want it to inherit a signal handler. If vixie-cron should reset SIGPIPE handling to SIG_DFL, it should do so for EVERY signal that it does not explicitly set a handler for, and so should every process that may be run from an RPM %post . Yet processes are meant to be able to assume that signal handlers are at SIG_DFL on start-up . So I think we should fix RPM not to run %post scripts with 'trap'-ed signals rather than patching every process that may be run from a %post script to restore signal handling to defaults. putting the blame on RPM was a bit rash, I can't reproduce it. rhnsd is a more likely culprit. but I think cron has a special position, and most people expect the environment it gives new processes to be untainted. e.g., I would definitely call it a bug if it inherited the $PATH root had when starting the daemon. by environment I mean rlimits, signal handlers and of course environment variables. (I remember starting inetd with a full environment 10 years ago. telnetd didn't clear $LOGNAME, and they were very confused when various applications identified them as _me_ :-) I understand your position, but I think by the principle of least surprise, the behaviour of crond should be constant, regardless of the circumstances of invocation. rpm traps sigpipe in order to gracefully close a rpmdb when less is executed early in rpm -qa | less crond needs to be fixed, because its not only rpm that can do "service crond restart" with signals in non-default settings, any command run by root will show the same symptoms if signal handlers are changed. This problem will be resolved in a future major release of Red Hat Enterprise Linux. Red Hat does not currently plan to provide a resolution for this in a Red Hat Enterprise Linux update for currently deployed systems. |