Open JamiKettunen opened 6 months ago
as a first step, could you juggle around the versions of stuff here to make podman etc match (void is 4.9.3)? maybe this is a 5.0 regression
i can reproduce this, interestingly using crun kill
(or runc kill
, whichever runtime you are using) works as expected
another thing: using crun kill
works, but crun kill --all
(which podman seemingly invokes) does not, both immediately exit but only one results in the container being stopped
when you look at the container status:
$ cat /run/user/1000/crun/4b92c2aeb85d3299596a764de4abf8886b5e3405c9503ea767779ff0c07957b9/status
{
"pid": 10309,
"process-start-time": 1448781,
"cgroup-path": "",
"scope": "",
"intelrdt": "",
"rootfs": "/home/q66/.local/share/containers/storage/overlay/0f34c6c12f7880fa34ed8be8ce062f8db2937f5f9ffea082f20d3466c41de5cf/merged",
"systemd-cgroup": false,
"bundle": "/home/q66/.local/share/containers/storage/overlay-containers/4b92c2aeb85d3299596a764de4abf8886b5e3405c9503ea767779ff0c07957b9/userdata",
"created": "2024-04-01T18:02:21.605445Z",
"owner": "root",
"detached": true,
"external_descriptors": "[\"/dev/null\",\"pipe:[208100]\",\"pipe:[208101]\"]"
}
the cgroup path is empty, so an attempt to do a cgroup kill will never happen
Included a workaround for this in https://github.com/chimera-linux/cports/pull/1726/commits/f0fd027a80c51a410242eaa7c4365ea88eba76c9 of the distrobox
PR, causes some strange additional spam but oh well
DEBU[0000] Sending signal 15 to container cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39
DEBU[0000] Sending signal 9 to container cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39
ERRO[0000] container not running
DEBU[0000] Cleaning up container cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39
DEBU[0000] Network is already cleaned up, skipping...
WARN[0000] freezer not supported: openat2 /sys/fs/cgroup/cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39/cgroup.freeze: no such file or directory
WARN[0000] lstat /sys/fs/cgroup/cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39: no such file or directory
DEBU[0000] Successfully cleaned up container cdb25d06b35b925c6e820e2260096d6ca2f9131ea6d97097fd34639a25609e39
the workaround looks reasonable, but it'd be nice to ask upstream what they think as we might be missing something
This might have been semi-fixed in a recent update to conmon
? I ran into this bug so I went to report it, but (after finding the issue, before posting) thought to double-check if there were any outstanding updates first; there was one to conmon
, and after updating it I can properly stop distrobox containers, although it still gives the error messages. I didn't note which version of conmon
I had before, though.
the repro in the issue body still hangs if you remove the kill-all-only-rootful.patch from podman, so it seems the same as before
This is my last major blocker for adding
distrobox
into the repo, reproducible with:with the last command output containing:
workaround to get back to a stopped state:
pkill conmon
fwiw attempting the same on Void musl
SIGTERM
is logged but it appears to go straight forSIGKILL
immediately afterward which does work: