Created attachment 511883 [details] log messages for bug Description of problem: sendmail fails to start after installing systemd test update: $ rpm -qa systemd\* systemd-units-26-7.fc15.x86_64 systemd-sysv-26-7.fc15.x86_64 systemd-26-7.fc15.x86_64 Not reproducible with previous stable release: 26-5.fc15
Created attachment 511884 [details] log messages for working systemd version
It seems this is not exactly a new bug, but the fixes in systemd-26-7.fc15 uncovered a previously latent bug. The reason I believe so is that the log from the working version (26-5.fc15) shows some unexpected behaviour too: 1. sendmail is started (OK) 2. sendmail is reloaded (OK) 3. Then however sendmail exits unexpectedly: [ 35.800771] systemd[1]: Received SIGCHLD from PID 1275 (sendmail). [ 35.801981] systemd[1]: Got SIGCHLD for process 1275 (sendmail) [ 35.802026] systemd[1]: Child 1275 died (code=exited, status=0/SUCCESS) [ 35.802031] systemd[1]: Child 1275 belongs to sendmail.service [ 35.802039] systemd[1]: sendmail.service: main process exited, code=exited, status=0 [ 35.802145] systemd[1]: sendmail.service changed running -> exited What does "systemctl status sendmail.service" show after booting with the working version (26-5.fc15)? And what does "cat /var/run/sendmail.pid" show?
And here's another thing to test: Remove the line "# pidfile: /var/run/sendmail.pid" from /etc/init.d/sendmail and see what happens after boot with the new systemd version (26-7.fc15).
Re: comment 2 # systemctl status sendmail.service sendmail.service - LSB: start and stop sendmail Loaded: loaded (/etc/rc.d/init.d/sendmail) Active: active (exited) since Fri, 08 Jul 2011 13:56:45 +0200; 1min 8s ago Process: 1502 ExecReload=/etc/rc.d/init.d/sendmail reload (code=exited, status=0/SUCCESS) Process: 1130 ExecStart=/etc/rc.d/init.d/sendmail start (code=exited, status=0/SUCCESS) Main PID: 1258 (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/sendmail.service ├ 1516 sendmail: accepting connections └ 1518 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue # cat /var/run/sendmail.pid 1516 /usr/sbin/sendmail -bd -q1h Reply to comment 3 will follow...
Re: comment 3 With the removed pid line, it started: # systemctl status sendmail.service sendmail.service - LSB: start and stop sendmail Loaded: loaded (/etc/rc.d/init.d/sendmail) Active: active (running) since Fri, 08 Jul 2011 14:00:33 +0200; 25s ago Process: 1487 ExecReload=/etc/rc.d/init.d/sendmail reload (code=exited, status=0/SUCCESS) Process: 1131 ExecStart=/etc/rc.d/init.d/sendmail start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/sendmail.service ├ 1505 sendmail: accepting connections └ 1507 sendmail: Queue runner@01:00:00 for /var/spool/cli... # cat /var/run/sendmail.pid 1505 /usr/sbin/sendmail -bd -q1h
I see. sendmail does not merely reload its configuration on SIGHUP (the reload action). It does a full restart itself and it then runs with a new PID. (http://www.c3.hu/docs/oreilly/tcpip/sendmail/ch26_03.htm) This is incorrect behaviour. LSB specifies the "reload" action as: cause the configuration of the service to be reloaded without actually stopping and restarting the service If a service does not support a real reload, its initscript should not provide the action. Could systemd workaround this somehow? It could re-read the pidfile after '/etc/init.d/sendmail reload' finishes. But the reload action merely sends SIGHUP to the sendmail process and nothing guarantees that sendmail has finished its restarting by the time the initscript exits. For now I'll remove the patch from systemd-26-7.fc15 that uncovered this bug (0001-service-pidfile-in-SysV-chkconfig-header-implies-a-r.patch). However the patch fixes some other bugs, so it would be nice to be able to put it back eventually. Michael, see if using "restart" instead of "reload" in /NetworkManager/dispatcher.d/10-sendmail fixes it.
[cloned this for sendmail as bug 719931]
Yes, success: # rpm -V sendmail 5S.T..... /etc/NetworkManager/dispatcher.d/10-sendmail # systemctl status sendmail.service sendmail.service - LSB: start and stop sendmail Loaded: loaded (/etc/rc.d/init.d/sendmail) Active: active (running) since Fri, 08 Jul 2011 17:07:00 +0200; 35s ago Process: 1396 ExecStop=/etc/rc.d/init.d/sendmail stop (code=exited, status=0/SUCCESS) Process: 1422 ExecStart=/etc/rc.d/init.d/sendmail start (code=exited, status=0/SUCCESS) Main PID: 1435 (sendmail) CGroup: name=systemd:/system/sendmail.service ├ 1435 sendmail: accepting connections └ 1444 sendmail: Queue runner@01:00:00 for /var/spool/cli... # rpm -qa systemd\* systemd-26-7.fc15.x86_64 systemd-units-26-7.fc15.x86_64 systemd-sysv-26-7.fc15.x86_64
(In reply to comment #6) > For now I'll remove the patch from systemd-26-7.fc15 that uncovered this bug > (0001-service-pidfile-in-SysV-chkconfig-header-implies-a-r.patch). Done, Bodhi update edited: https://admin.fedoraproject.org/updates/systemd-26-8.fc15
Closing. systemd-26-8.fc15, which replaced the updates-testing update with this bug, works fine.