TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.57k stars 244 forks source link

lx: alpine zone upgraded to 3.13 can't reboot anymore #969

Closed janv37 closed 10 months ago

janv37 commented 3 years ago

Hello smartos-live,

I'm using many alpine linux zones (LX), update (from: 19aa3328-0025-11e7-a19a-c39077bfd4cf) to latest 3.13 breaks reboot functionality.

66c60285-54af-ee40-ca60-904aade29c33:~# reboot
reboot: (null): Operation not permitted

66c60285-54af-ee40-ca60-904aade29c33:~# strace -s 65535 -f reboot
execve("/sbin/reboot", ["reboot"], 0x7fffffeffc58 /* 14 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7fffef38db48) = 0
set_tid_address(0x7fffef38df90)         = 12430
brk(NULL)                               = 0x1000
brk(0x3000)                             = 0x3000
mmap(0x1000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1000
mprotect(0x7fffef38a000, 4096, PROT_READ) = 0
mprotect(0x7fffef456000, 16384, PROT_READ) = 0
getuid()                                = 0
nanosleep({tv_sec=0, tv_nsec=0}, 0x7fffffeffb50) = 0
sync()                                  = 0
kill(1, SIGTERM)                        = -1 EPERM (Operation not permitted)
access("/proc/meminfo", F_OK)           = 0
write(2, "reboot: (null): Operation not permitted\n", 40reboot: (null): Operation not permitted
) = 40
exit_group(1 <unfinished ...>
+++ exited with 1 +++

66c60285-54af-ee40-ca60-904aade29c33:~# kill -1 1
ash: can't kill pid 1: Operation not permitted

I've reported this upstream on 20210115, but not much has happened there: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12302

# cat /etc/apk/repositories 
http://dl-cdn.alpinelinux.org/alpine/v3.13/main
http://dl-cdn.alpinelinux.org/alpine/v3.12/main
http://dl-cdn.alpinelinux.org/alpine/v3.13/community

// downgrade 3.13's busybox and pin version
# apk add busybox==1.31.1-r19
(1/2) Downgrading busybox (1.32.1-r0 -> 1.31.1-r19)
Executing busybox-1.31.1-r19.post-upgrade
(2/2) Downgrading ssl_client (1.32.1-r0 -> 1.31.1-r19)
Executing busybox-1.31.1-r19.trigger
OK: 256 MiB in 86 packages

This is above my skill level with both smartos and linux. Can anybody more skilled please look into this from smartos side too?

Thank you, JV

teutat3s commented 2 years ago

Just came across this as well on alpine 3.15 lx brand with busybox 1.34.1 - the last information in the upstream bug is

it looks like the SIGTERM handler for /sbin/init isnt getting registered correctly with busybox 1.32

It seems this is still an issue and alpine 3.13 will be EOL'd in November 2022.

Can I do anything to help debug this?

peterkelm commented 1 year ago

Same with alpine 3.18 lx zones on up-to-date smartOS. BusyBox is at v1.36.0. Any thought on how to get this resolved?

janv37 commented 10 months ago

Hi, 3.18 LX alpine linux with busybox 1.36.0 from: b5d89e30-128d-4ea4-824f-8e36fd7e3703 alpine-3 20230721 linux lx-dataset 2023-07-21

works just fine. this could be closed as fixed. Tested on joyent_20230828T151332Z. JV