Bug 1253840
Summary: | sendmail startup complains "sendmail.pid not readable (yet?) after start" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Joseph D. Wagner <joe> |
Component: | sendmail | Assignee: | Jaroslav Škarvada <jskarvad> |
Status: | CLOSED WONTFIX | QA Contact: | qe-baseos-daemons |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.3 | CC: | amahdal, extras-qa, joe, jskarvad, michal, sergio |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 1057879 | Environment: | |
Last Closed: | 2017-01-05 14:28:20 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1298243 |
Description
Joseph D. Wagner
2015-08-14 21:02:48 UTC
Permissions on /run/sendmail.pid are not set correctly. At a minimum, group (smmsp) should be able to read. Not sure if group needs write. From [url]https://www.freedesktop.org/software/systemd/man/systemd.service.html[/url] "Please set PIDFile= accordingly. Note that the daemon should write that file before finishing with its initialization. Otherwise, systemd might try to read the file before it exists." So it looks like sendmail creates pid file before exit ... (makes sense since sendmail have 2 processes) , editing /usr/lib/systemd/system/sendmail.service and comment out PIDFile entry [1], solves the problem, I don't known if it's worth report it, but seems still works correctly and don't report any warning. [1] #PIDFile=/run/sendmail.pid The core of this problem is that sendmail main process fork the child (the server) and the main process then immediately exits without writing the PID. The PID file is written later at some non-deterministic moment. This is flow of the design. The cleanly written daemon should write the PID in the main process before it exits. Unfortunately this is not easy to fix in sendmail. We tried in the past, but we was not successful to get the fix upstream - the change in behaviour could also break others. Fortunately systemd can cope with this problem and the only drawback is the harmless warning in the journal stating that the PID file wasn't there in time it should be. |