Subject: bug#76338: shepherd restarts service during shutdown and then waits forever

From: Ashvith Shetty <[email-masked]>
Date: Thu, 20 Feb 2025 02:58:09 +0530

Hello,
I also have the same exact issue. Here's the shutdown log:

--8<---------------cut here---------------start------------->8---
Feb 20 00:37:30 localhost elogind[426]: System is powering down.
Feb 20 00:37:30 localhost elogind[426]: Removed session c2.
Feb 20 00:37:30 localhost NetworkManager[503]: <info> 
[1739992050.8059] device (wlp3s0): state change: activated ->
deactivating (reason 'connection-removed', sys-iface-state: 'managed')
Feb 20 00:37:30 localhost NetworkManager[503]: <info> 
[1739992050.8069] manager: NetworkManager state is now CONNECTED_LOCAL
Feb 20 00:37:30 localhost dbus-daemon[415]: [system] Activating service
name='org.freedesktop.nm_dispatcher' requested by ':1.10' (uid=0
pid=503 comm="/gnu/store/zav4w5jrcn4yhcawg9l0smv7g2hmyais-networ")
(using servicehelper)
Feb 20 00:37:30 localhost dbus-daemon[415]: [system] Successfully
activated service 'org.freedesktop.nm_dispatcher'
Feb 20 00:37:30 localhost vmunix: [40112.799390] wlp3s0:
deauthenticating from 54:37:bb:d2:dd:3d by local choice (Reason:
3=DEAUTH_LEAVING)
Feb 20 00:37:30 localhost shepherd[1]: Stopping service root... 
Feb 20 00:37:30 localhost shepherd[1]: Exiting shepherd... 
Feb 20 00:37:30 localhost shepherd[1]: Stopping service swap-swap... 
Feb 20 00:37:30 localhost shepherd[1]: Service swap-swap stopped. 
Feb 20 00:37:30 localhost shepherd[1]: Service swap-swap is now
stopped. 
Feb 20 00:37:30 localhost shepherd[1]: Stopping service lightdm... 
Feb 20 00:37:31 localhost wpa_supplicant[437]: wlp3s0: CTRL-EVENT-
DISCONNECTED bssid=54:37:bb:d2:dd:3d reason=3 locally_generated=1
Feb 20 00:37:31 localhost wpa_supplicant[437]: wlp3s0: CTRL-EVENT-DSCP-
POLICY clear_all
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2420] device (wlp3s0): state change: deactivating ->
disconnected (reason 'connection-removed', sys-iface-state: 'managed')
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2428] dhcp4 (wlp3s0): canceled DHCP transaction
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2428] dhcp4 (wlp3s0): activation: beginning transaction
(timeout in 45 seconds)
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2429] dhcp4 (wlp3s0): state changed no lease
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2435] dhcp6 (wlp3s0): canceled DHCP transaction
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2435] dhcp6 (wlp3s0): activation: beginning transaction
(timeout in 45 seconds)
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2436] dhcp6 (wlp3s0): state changed no lease
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2809] device (wlp3s0): set-hw-addr: set MAC address to
5E:3F:03:00:57:16 (scanning)
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.2908] dns-mgr: Removing DNS information from
/gnu/store/139drha7awx79jb2js4m88p2jsl7zasc-openresolv-
3.13.2/sbin/resolvconf
Feb 20 00:37:31 localhost nscd: 1232 monitored file `/etc/resolv.conf`
was written to
Feb 20 00:37:31 localhost shepherd[1]: Service lightdm stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service lightdm is now stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service ssh-daemon... 
Feb 20 00:37:31 localhost shepherd[1]: Service ssh-daemon stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service ssh-daemon is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service avahi-daemon...
Feb 20 00:37:31 localhost shepherd[1]: Service avahi-daemon stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service avahi-daemon is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service ntpd... 
Feb 20 00:37:31 localhost ntpd[619]: ntpd exiting on signal 15
(Terminated)
Feb 20 00:37:31 localhost shepherd[1]: Service ntpd stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service ntpd is now stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service dockerd... 
Feb 20 00:37:31 localhost shepherd[1]: Service dockerd stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service dockerd is now stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service
NetworkManager... 
Feb 20 00:37:31 localhost shepherd[1]: [NetworkManager] Terminated 
Feb 20 00:37:31 localhost NetworkManager[503]: <warn> 
[1739992051.4008] dns-mgr: could not commit DNS changes:
/gnu/store/139drha7awx79jb2js4m88p2jsl7zasc-openresolv-
3.13.2/sbin/resolvconf returned error code
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5026] caught SIGTERM, shutting down normally.
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5029] device (wlp3s0): supplicant interface state:
completed -> disconnected
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5029] device (p2p-dev-wlp3s0): supplicant management
interface state: completed -> disconnected
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5032] device (wlp3s0): supplicant interface state:
disconnected -> interface_disabled
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5033] device (p2p-dev-wlp3s0): supplicant management
interface state: disconnected -> interface_disabled
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5034] device (wlp3s0): supplicant interface state:
interface_disabled -> disconnected
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5035] device (p2p-dev-wlp3s0): supplicant management
interface state: interface_disabled -> disconnected
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5179] device (wlp3s0): state change: disconnected ->
unmanaged (reason 'unmanaged', sys-iface-state: 'managed')
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5719] device (wlp3s0): set-hw-addr: reset MAC address to
98:3B:8F:30:37:7A (unmanage)
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.5879] device (p2p-dev-wlp3s0): state change: disconnected -
> unmanaged (reason 'removed', sys-iface-state: 'removed')
Feb 20 00:37:31 localhost wpa_supplicant[437]: p2p-dev-wlp3s0: CTRL-
EVENT-DSCP-POLICY clear_all
Feb 20 00:37:31 localhost wpa_supplicant[437]: p2p-dev-wlp3s0: CTRL-
EVENT-DSCP-POLICY clear_all
Feb 20 00:37:31 localhost wpa_supplicant[437]: nl80211: deinit
ifname=p2p-dev-wlp3s0 disabled_11b_rates=0
Feb 20 00:37:31 localhost NetworkManager[503]: <info> 
[1739992051.6236] exiting (success)
Feb 20 00:37:31 localhost shepherd[1]: Service NetworkManager stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service NetworkManager is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service wpa-
supplicant... 
Feb 20 00:37:31 localhost wpa_supplicant[437]: wlp3s0: CTRL-EVENT-DSCP-
POLICY clear_all
Feb 20 00:37:31 localhost wpa_supplicant[437]: wlp3s0: CTRL-EVENT-DSCP-
POLICY clear_all
Feb 20 00:37:31 localhost wpa_supplicant[437]: nl80211: deinit
ifname=wlp3s0 disabled_11b_rates=0
Feb 20 00:37:31 localhost shepherd[1]: Service wpa-supplicant stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service wpa-supplicant is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service bluetooth... 
Feb 20 00:37:31 localhost bluetoothd[428]: Terminating
Feb 20 00:37:31 localhost bluetoothd[428]: Stopping SDP server
Feb 20 00:37:31 localhost bluetoothd[428]: Exit
Feb 20 00:37:31 localhost shepherd[1]: Service bluetooth stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service bluetooth is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service upower-
daemon... 
Feb 20 00:37:31 localhost shepherd[1]: Service upower-daemon stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service upower-daemon is now
stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service pam... 
Feb 20 00:37:31 localhost shepherd[1]: Service pam stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service pam is now stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service elogind... 
Feb 20 00:37:31 localhost elogind[426]: Received signal 15 [TERM]
Feb 20 00:37:31 localhost shepherd[1]: Service elogind stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service elogind is now stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Stopping service libvirtd... 
Feb 20 00:37:31 localhost shepherd[1]: Service libvirtd stopped. 
Feb 20 00:37:31 localhost shepherd[1]: Service libvirtd is now stopped.
Feb 20 00:37:31 localhost shepherd[1]: Stopping service dbus-system... 
Feb 20 00:37:31 localhost ModemManager[531]: <msg> caught signal,
shutting down... 
Feb 20 00:37:31 localhost nm-dispatcher: Caught signal 15, shutting
down...
Feb 20 00:37:32 localhost shepherd[1]: Service dbus-system stopped. 
Feb 20 00:37:32 localhost shepherd[1]: Service dbus-system is now
stopped. 
Feb 20 00:37:32 localhost ModemManager[531]: <msg> ModemManager is shut
down 
Feb 20 00:37:32 localhost shepherd[1]: Stopping service term-console...
Feb 20 00:37:32 localhost shepherd[1]: Service term-console stopped. 
Feb 20 00:37:32 localhost shepherd[1]: Service term-console is now
stopped. 
Feb 20 00:37:32 localhost shepherd[1]: Stopping service nscd... 
Feb 20 00:37:32 localhost shepherd[1]: Service nscd stopped. 
Feb 20 00:37:32 localhost shepherd[1]: Service nscd is now stopped. 
Feb 20 00:37:32 localhost syslogd: exiting on signal 15
--8<---------------cut here---------------start------------->8---

Regards,
Ashvith