main/busybox: acpid 100% CPU usage
I had acpid get stuck with a closed event fd twice. I am not sure how to reproduce but maybe it is possible by simulating a frequent device disconnect.
acpid gets stuck when poll(2)
sets POLLIN
, POLLRDHUP
and POLLERR
on revents
. acpid will only close the file descriptor when POLLIN
is not set: util-linux/acpid.c#335
. Maybe check for POLLRDHUP
too?
I couldn't find anything on the man page whenever this combination is disallowed to be returned. So I assume it's not a musl error.
Also send upstream but without response: http://lists.busybox.net/pipermail/busybox/2024-February/090616.html
CC @nmeum (Can be fixed after alpine 3.20)