Sometimes dbus-pre fails to stop at poweroff/reboot 10 October 2024, 14:35:46 This script is called: /usr/lib/artix/sv-cg.sh down dbus.It then calls /usr/share/artix/cgroups/util-sv-cg.sh and some cgroup command called by function sv_cg_down seems to exit nonzero.LE: probably nothing wrong with the script except that it's too correct, it's that dbus lingers for some reason. Dinit doesn't give that message "Unable to stop all processes" on the TTY at shutdown when the service fails. Excuse the telephone picture, no serial console I will investigate further as to why it only sometimes fails. Last Edit: 11 October 2024, 16:23:43 by Hitman
Re: Sometimes dbus-pre fails to stop at poweroff/reboot Reply #1 – 12 October 2024, 10:18:16 A previous post https://forum.artixlinux.org/index.php/topic,7251.0.html gave me the idea to replace Code: [Select]/bin/bash with Code: [Select]/bin/sh in the following files:/etc/dinit.d/dbus-pre/usr/lib/dinit.d/cgroupsNow /etc/dinit.d/dbus-pre looks like this:Code: [Select]type = scriptedcommand = /usr/lib/dinit/pre/dbusstop-command = /bin/sh /usr/lib/artix/sv-cg.sh down dbusafter = local.targetrestart = falseand /usr/lib/dinit.d/cgroups looks like this:Code: [Select]type = scriptedcommand = /bin/sh /usr/lib/artix/mount-cgroups.shrestart = falsedepends-on = pseudofsI do not see any longer the failure message for the dbus-pre service when stopping the system.Seems to be the correct solution, right ? 1 Likes
Re: Sometimes dbus-pre fails to stop at poweroff/reboot Reply #2 – 12 October 2024, 11:38:42 Curious if this works, will report back.Spoiler (click to show/hide)Although /bin/sh is symlinked to bash (by default), bash seems to know it's called as posix sh and opens a different prompt (LE it's right https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bash-POSIX-Mode), so if it's compatibility stuff triggers too it can be a solution as long as an exotic shell is not linked to /bin/sh later (by the user). Last Edit: 12 October 2024, 11:46:45 by Hitman
Re: Sometimes dbus-pre fails to stop at poweroff/reboot Reply #3 – 12 October 2024, 16:41:49 Well, the change does not have any effect.I just rebooted my system and the error message was again there - Code: [Select]dinit: Service dbus-pre stop command failed with exit code 1
Re: Sometimes dbus-pre fails to stop at poweroff/reboot Reply #4 – 12 October 2024, 17:17:01 I still get it about half the time.Wondering why the script has a check for /sys/fs/cgroup/dbus.sv/cgroup.kill, it should kill all the processes in /sys/fs/cgroup/dbus.sv/cgroup.procs init style: try sending term then kill right away, or is that what the sv_cg_cleanup function is doing but directly?