[Error] Containers stuck in "Stopping" after distrobox stop on Gentoo/OpenRC
- 主要言語
- Go
- スター
- 13k
- フォーク
- 541
- 平均マージ
- 20時間 47分
- マージ済み PR(30日)
- 4
説明
**Describe the bug**
`distrobox stop` leaves containers stuck in `Stopping` state on my Gentoo/OpenRC host when using rootless Podman.
This happens even with a minimal Ubuntu 24.04 distrobox. After entering the container and exiting the shell, `distrobox stop ` sends SIGTERM, waits 10 seconds, escalates to SIGKILL, then fails with:
```text
Error: given PID did not die within timeout
```
The container remains stuck as `Stopping` in `podman ps -a`.
Plain Podman containers do not get stuck in the same way. For example, a simple `podman run ... sleep infinity` container may require SIGKILL, but it still exits and can be removed normally. The stuck behavior appears specific to Distrobox containers / Distrobox entrypoint cleanup.
**To Reproduce**
```bash
distrobox create --name dbtest --image docker.io/library/ubuntu:24.04
distrobox enter dbtest
exit
distrobox stop dbtest
```
Actual result:
```text
Do you really want to stop dbtest? [Y/n]: Y
WARN[0010] StopSignal SIGTERM failed to stop container dbtest in 10 seconds, resorting to SIGKILL
Error: given PID did not die within timeout
```
Then:
```bash
podman ps -a
```
shows:
```text
CONTAINER ID IMAGE COMMAND STATUS NAMES
... docker.io/library/ubuntu:24.04 --verbose --name ... Stopping dbtest
```
I can manually inspect the stuck container PID:
```bash
podman inspect dbtest --format '{{.State.Pid}} {{.State.Status}}'
```
Example from another affected container:
```text
26935 stopping
```
And force it to stop manually:
```bash
sudo kill -9 26935
podman container cleanup dbtest
```
**Expected behavior**
`distrobox stop dbtest` should stop the container cleanly, or at least successfully force-stop it after SIGKILL, leaving the container in an exited/stopped state rather than stuck in `Stopping`.
**Logs**
I can attach verbose logs separately if needed.
Relevant observed output:
```text
$ distrobox stop dbtest
Do you really want to stop dbtest? [Y/n]: Y
WARN[0010] StopSignal SIGTERM failed to stop container dbtest in 10 seconds, resorting to SIGKILL
Error: given PID did not die within timeout
```
`podman ps -a` afterward:
```text
CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES
2321d598f444 docker.io/library/ubuntu:24.04 --verbose --name ... About a minute ago Stopping dbtest
```
Plain Podman comparison test:
```bash
podman run --name test-stop -dit ubuntu:24.04 sleep infinity
podman stop test-stop
podman rm test-stop
```
Result:
```text
WARN[0010] StopSignal SIGTERM failed to stop container test-stop in 10 seconds, resorting to SIGKILL
test-stop
test-stop
```
So plain Podman did force-kill and remove the test container successfully. It did not remain stuck in `Stopping`.
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod?
Podman, rootless.
- Which version of podman, docker or lilipod?
```text
podman version 5.7.1
```
From `podman info --debug`:
```text
APIVersion: 5.7.1
Version: 5.7.1
BuildOrigin: Gentoo Portage
GoVersion: go1.26.2-X:nodwarf5
OsArch: linux/amd64
```
- Which version of distrobox?
```text
distrobox: 1.8.2.4
```
- Which host distribution?
Gentoo Linux, OpenRC, no systemd.
```text
distribution: gentoo
version: 2.18
kernel: 6.18.32-gentoo-dist
```
`uname -a`:
```text
Linux monadrix 6.18.32-gentoo-dist #1 SMP PREEMPT_DYNAMIC Sun May 17 16:28:39 -00 2026 x86_64 AMD Ryzen 7 5800H with Radeon Graphics AuthenticAMD GNU/Linux
```
OpenRC services from `rc-status` include:
```text
sysklogd
dbus
NetworkManager
display-manager
user.ivxvm
```
- How did you install distrobox?
Installed from Gentoo Portage:
```text
app-containers/distrobox-1.8.2.4::gentoo
```
Podman/conmon/crun/netavark are also from Gentoo packages:
```text
app-containers/conmon-2.1.13
app-containers/crun-1.21
app-containers/netavark-1.17.1
app-containers/aardvark-dns-1.17.0
net-misc/passt-2025.12.15
```
**Additional context**
Rootless Podman details:
```text
rootless: true
cgroupManager: cgroupfs
cgroupVersion: v2
eventLogger: file
networkBackend: netavark
rootlessNetworkCmd: pasta
graphDriverName: overlay
graphRoot: /home/ivxvm/.local/share/containers/storage
runRoot: /run/user/1000/containers
databaseBackend: sqlite
```
OCI runtime:
```text
ociRuntime:
name: crun
package: app-containers/crun-1.21
path: /usr/bin/crun
version: crun version 1.21
```
Conmon:
```text
conmon:
package: app-containers/conmon-2.1.13
path: /usr/libexec/podman/conmon
version: conmon version 2.1.13
```
Network:
```text
networkBackend: netavark
rootlessNetworkCmd: pasta
aardvark-dns 1.17.0
netavark 1.17.1
pasta 2025.12.15
```
Storage:
```text
graphDriverName: overlay
Backing Filesystem: btrfs
Native Overlay Diff: true
Supports d_type: true
Supports shifting: false
Supports volatile: true
Using metacopy: false
```
コントリビューションガイド
評価
この issue はまだ評価されていません。