containers / containers/toolbox

Active toolbox sessions prevent systemd shutdown

Open
#993 1 comment 4 reactions 0 assignees View on GitHub
1. Bug
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

**Describe the bug**
If you have an active toolbox session and you try to reboot the host machine, the container will refuse to shutdown. Eventually it will timeout and systemd will forcibly kill the process.

**Steps how to reproduce the behavior**
1. Enter any toolbox with `toolbox enter my-container`
2. Trigger a shutdown from the host machine. (On gnome I click the top-right menu -> Power Off / Log out -> Power Off...)
3. "A stop job is running..." from systemd

**Expected behaviour**
The container should gracefully shutdown and shutdown should work.

**Actual behaviour**
Wait for systemd to SIGKILL the container process.

**Output of `toolbox --version` (v0.0.90+)**
```
toolbox version 0.0.99.3
```

**Toolbox package info (`rpm -q toolbox`)**
```
➜ ~ pacman -Qi toolbox
Name : toolbox
Version : 0.0.99.3-1
Description : Unprivileged development environment
Architecture : x86_64
URL : https://github.com/containers/toolbox
Licenses : APACHE
Groups : None
Provides : None
Depends On : podman bash flatpak
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 7.18 MiB
Packager : Morten Linderud
Build Date : Mon 13 Dec 2021 11:21:43 AM PST
Install Date : Thu 06 Jan 2022 11:43:16 AM PST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
```

**Output of `podman version`**
```
Version: 3.4.4
API Version: 3.4.4
Go Version: go1.17.4
Git Commit: f6526ada1025c2e3f88745ba83b8b461ca659933
Built: Thu Dec 9 10:30:40 2021
OS/Arch: linux/amd64
```

**Podman package info (`rpm -q podman`)**
```
➜ ~ pacman -Qi podman
Name : podman
Version : 3.4.4-1
Description : Tool and library for running OCI-based containers in pods
Architecture : x86_64
URL : https://github.com/containers/podman
Licenses : Apache
Groups : None
Provides : None
Depends On : cni-plugins conmon containers-common crun fuse-overlayfs
iptables libdevmapper.so=1.02-64 libgpgme.so=11-64
libseccomp.so=2-64 slirp4netns
Optional Deps : apparmor: for AppArmor support
btrfs-progs: support btrfs backend devices [installed]
catatonit: --init flag support
podman-docker: for Docker-compatible CLI
Required By : toolbox
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 72.79 MiB
Packager : David Runge
Build Date : Thu 09 Dec 2021 10:30:40 AM PST
Install Date : Thu 06 Jan 2022 11:43:16 AM PST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
```

**Info about your OS**
ArchLinux (as of Jan. 21, 2022)

**Additional context**
I can reproduce the issue using either of these images:

```
➜ ~ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.fedoraproject.org/fedora-toolbox 34 4a61e887a820 4 weeks ago 353 MB
registry.hub.docker.com/jmennius/ubuntu-toolbox 21.10 cbb6d324bf93 2 months ago 440 MB
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.