Bug 1650552

Summary: sendmail fail if restart quick after start
Product: [Fedora] Fedora Reporter: Tomáš Hozza <thozza>
Component: sendmailAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 31CC: amahdal, anon.amish, jskarvad, oppiet35, qe-baseos-daemons, redhat-bugzilla, rskvaril
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1165391 Environment:
Last Closed: 2020-11-24 16:51:21 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:

Description Tomáš Hozza 2018-11-16 13:41:00 UTC
+++ This bug was initially created as a clone of Bug #1165391 +++

Description of problem:
sendmail fail if restart right after start

Version-Release number of selected component (if applicable):
sendmail-8.14.7-4.el7.x86_64

How reproducible:


Steps to Reproduce:
1.start
2.restart
3.

Actual results:
:: [   PASS   ] ::  Service have to implement start function  (Expected 0, got 0)
:: [  BEGIN   ] ::  Service have to implement restart function  :: actually running 'service sendmail restart'
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed. See 'systemctl status sendmail.service' and 'journalctl -xn' for details.
:: [   FAIL   ] ::  Service have to implement restart function  (Expected 0, got 1)

Expected results:
[PASS]

Additional info:
sendmail.service start request repeated too quickly, refusing to start.
Maybe some its some problem with pidfile : PID file /run/sendmail.pid not readable (yet?) after start. a Failed to read PID from file /run/sm-client\.pid

--- Additional comment from Jaroslav Škarvada on 2014-11-20 10:54:54 CET ---

I am afraid this is unfixable (or more precisely not worth the fix) at the moment.

There are two systemd services bind together, both forking. The PID file is written in the child process, not the parent, that's why systemd has to use notify + timeout to get the PID file.

In the past we tried:
a) moving write PID from the child to the parent process
b) patching sendmail to provide same functionality in the non daemon mode as in the daemon mode and switching systemd services to non-forking mode

Both weren't trivial patches and both were rejected upstream. Not counting that fast consecutive restarts of mail server aren't typical use case.

Comment 1 Ben Cotton 2019-08-13 17:02:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Ben Cotton 2019-08-13 19:41:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 3 Robert Hinson 2020-06-30 13:51:11 UTC
sm-client.service: Failed to parse PID from file /run/sm-client.pid: Invalid
 argument: 1 Time(s)

This is in Fedora 32.

Comment 4 Robert Hinson 2020-06-30 13:52:42 UTC
sendmail-8.15.2-43.fc32.x86_64

Comment 5 Ben Cotton 2020-11-03 17:01:32 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2020-11-24 16:51:21 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.