-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
lx: alpine zone can't shutdown ("poweroff") due to "Operation not permitted" error #1119
Comments
Which alpine image are you using? |
@bahamat: The latest ones offered by imgadm. The strace output in my initial report is from a machine that uses image "632a25ad-15dc-42f0-a23b-743b37f62cbb". |
This is where people should look, I think?
A DTrace in-kernel to figure out why SIGUSR2 fails would be illuminating (assuming, of course, this call makes it into the kernel and isn't stuffed somewhere in whatever libc Alpine uses... uggh). |
@peterkelm Can you show me the output of this command?
|
|
Just in case: "native" Alpine Linux only has "reboot", "halt" and "poweroff" but no "shutdown". For the LX zones:
|
I've reproduced this. And I have a lead. Does this misbehavior happen with 3.12, or only 3.13 and later? |
I ask because something changed where the init(8) process in alpine no longer receives signals for SIGUSR[12]. I want to know which versions of Alpine work and don't; it'll help determine what's wrong and where. |
ALSO, "poweroff" is a native tool now. The reboot and halt commands are overwritten to use /native/usr/bin/pkill as appropriate (part of our image construction). Still... why busybox's |
@danmcd, thanks for the followup. From what I recall, 3.13 was the last version that worked. The next one we tried was 3.18, though… am going to reconfirm that tomorrow. Also, there aren't many commits to this part of busybox in a long time - but this one might be "the one". Lastly, I've tried to look into dtrace but am pretty much a novice with that tool. So I haven't come very far with it yet. :-( The "poweroff" code seems to essentially call "kill(1, SIGUSR2)" - and that gives the same "Operation not permitted" result. Well, at least that's consistent with what "poweroff" does... |
That is interesting... it's almost as if the restoration block never gets reached in LX launches of this. I wonder why? |
Quick update before I fall asleep:
Unfortunately there aren't any other "official" alpine LX images in-between... |
To narrow this down further I replaced the busybox version in my Alpine Linux 3.18.2 "LX test zone" with those from older Alpine Linux releases (downloaded from their respective repo, force stopped the LX zone, replaced busybox, restarted the zone):
|
Interesting about the zone state. Does
|
My bad, that "zone state still running" comment wasn't as clear as it should have been: This refers to the zone state after a "halt" command, not the "poweroff" (the latter seems to just exit with that error message). Sorry for missing to mention that in the first place. The pgrep output after that "halt" is:
|
So "halt" isn't killing all of the processes. I'll bet if you did |
Tried that - I am kicked out of the LX zone but that's it. The zone is still "running" and I can even Your |
Hmmm, |
Same result as before. The "-9" option doesn't seem to have an effect here. |
We have been experimenting with Alpine Linux LX images over a longer period of time. Since Alpine Linux version 3.13 we've seen issues on shutdown where the "poweroff" command yields an "Operation not permitted" error.
#969 is most likely a related issue.
We are running smartos 20250109T000743Z on that machine.
I am not sure where to look to get this fixed… any pointers?
The text was updated successfully, but these errors were encountered: