View Issue Details

IDProjectCategoryView StatusLast Update
0016392CentOS-7systemdpublic2019-09-06 23:01
Reportertwood-hf 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0016392: systemd hangs after update to 219-67.el7
DescriptionI'm starting to suspect a bug with the
[Service]
Type=oneshot
directive may have crept in. Or was it a bug fix?

My service script .service file looks like:

---

[Unit]
DefaultDependencies=no
Description=hf_connect_prenet
After=local-fs.target
Before=network-pre.target
Wants=network-pre.target

[Service]
Type=oneshot
WorkingDirectory=/etc/heartflow
ExecStart=/etc/heartflow/liverim_prenet.sh
TimeoutSec=0
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

---

liverim_prenet.sh adjusts /etc/rsyslog.conf and does
systemctl restart rsyslog
whereupon it hangs. The rsyslogd.service has

---

[Unit]
Description=System Logging Service
;Requires=syslog.socket
Wants=network.target network-online.target
After=network.target network-online.target
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/

[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/rsyslog
ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS
Restart=on-failure
UMask=0066
StandardOutput=null
Restart=on-failure

[Install]
WantedBy=multi-user.target
;Alias=syslog.service

---

The call to start rsyslogd did not previously hang, now it does. I suspect the bug may be that a oneshot service is now improperly blocking further calls to start services with systemctl, because a oneshot is supposed to finish before starting the rest of the services. But this restriction didn't formerly apply when the oneshot itself started other services.

PS For good measure, I updated rsyslogd to 8.24.
Steps To ReproduceSee description.
Tags"Restart", "restarting system", 7.6.1810, systemd
abrt_hash
URL

Activities

twood-hf

twood-hf

2019-09-06 23:01

reporter   ~0035080

Simple steps to repro:
- Add a service "svc-16392.service" with Type=oneshot, RemainAfterExit=true and the ExecStart= script like:
  echo "$0 started..."
  systemctl restart rsyslogd
  echo "$0 finishing..."
- After adding the service, do:
  systemctl start svc-16392
- Observe the script process stays running, with a "systemctl restart rsyslogd" subprocess. Ryslogd does not restart. Killing the systemctl subprocess allows the ssytemctl parent process to exit.

Issue History

Date Modified Username Field Change
2019-09-06 22:51 twood-hf New Issue
2019-09-06 22:51 twood-hf Tag Attached: "Restart"
2019-09-06 22:51 twood-hf Tag Attached: "restarting system"
2019-09-06 22:51 twood-hf Tag Attached: 7.6.1810
2019-09-06 22:51 twood-hf Tag Attached: systemd
2019-09-06 23:01 twood-hf Note Added: 0035080