Using Busybox poweroff/reboot never properly shuts down the system
I've just got a minimal Alpine system booting with dinit (using these service files) and it seems to work great. However the system fails to properly shutdown/reboot when using the Busybox command for it the last thing printed to the console is "Issuing shutdown via kernel..." but then hangs there forever. dinit-shutdown as provided by dinit itself in the Alpine packaging works fine however and according to the logs does basically the same thing, so I'm not sure what the difference is.
Hmm, do you mean, when using the Busybox version of shutdown? I'm actually surprised it gets even that far. Do you see the "Turning off swap..." and "Unmounting disks..." messages prior to "Issuing shutdown via the kernel..."?
using the Busybox version of shutdown
Yes.
Note that rcboot failing there also happens with dinit-shutdown, so it doesn't seem related.
The "devtmpfs busy" is odd. Does that happen when using dinit-shutdown?
(Just to be clear, it's basically coincidence that Busybox reboot command appears to use the same signal to issue a reboot that dinit expects. This isn't really supposed to work...) Edit: although, having got as far as printing the "Issuing shutdown" message, it really should shut down at that point.
It does yes. Output is basically the same for both commands, just the one actually shuts down the machine fully :sweat_smile:
Could you try kill -INT 1 as an alternative and see what happens with that? If that works, looks like Busybox reboot command is doing something funny to interfere with shutdown.
Yeah that works fine.
Ok, I'll probably have to try and reproduce it to debug this. It sort of falls in the "not really supported" category so for now just use dinit-shutdown instead. But it does seem something is going wrong so I'd like to check that out when I get a chance.