occasional hang on shutdown
Hello,
we've recently started using alpine on a slow arm board. Things mostly work fine, but running reboot or poweroff sometimes hang (looping reboot in a loop made our board hang once every 3 days or so, lovely bug to reproduce, especially as most of the userspace is gone by the time the openrc process is stuck) We've had the problem on alpine 3.16 and still have it on 3.17.
After analysis openrc is stuck in a malloc call, most certainly because it calls free() in its signal handler (and handles SIGCHLD while still allocating more stuff) I've written about it directly on openrc issue tracker: https://github.com/OpenRC/openrc/issues/589 (analysis/earlier discussion on musl list here: https://www.openwall.com/lists/musl/2023/01/23/1 -- linked in openrc issue)
I'll send openrc a patch in a few days; might as well track this here as well meanwhile.
(Also, a couple of open questions:
- I guess people using rc_parallel are rare?
- I've read we wanted to convert to s6 eventually, but haven't seen anything concrete -- now I'm looking again I see s6-rc/s6-linux-init in main, are there known users of it on bare metal? s6-linux-init with openrc probably does not make that much sense speedup-wise but is probably easy enough to do, I'll probably give s6-rc a try in the next few weeks....)