Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Toolbox quits when any program sends a sigkill not the top level command #1216

Closed
achew22 opened this issue Apr 11, 2016 · 10 comments · Fixed by coreos/coreos-overlay#2472
Closed

Comments

@achew22
Copy link

achew22 commented Apr 11, 2016

Is there any way to make it only care about sigkill from the bash command that is the root of the process tree?

@crawford
Copy link
Contributor

I can't reproduce this failure. Can you give me a simple test case?

@achew22
Copy link
Author

achew22 commented May 8, 2016

This seems to make it happen on my box with ~100% reliability

achew22@springs:~$ sh -c 'sleep 1000s' &
[1] 21888
achew22@springs:~$ kill -9 %1
achew22@springs:~$
Container my-container terminated by signal KILL.

If I run that on other boxes it doesn't seem to have a problem with it killing the parent.

@crawford
Copy link
Contributor

I cannot reproduce this in my toolbox (PRETTY_NAME="Fedora 23 (Twenty Three)"). Which version of Fedora is in your toolbox? Can you try recreating the toolbox with the latest?

@daper
Copy link

daper commented Jun 11, 2016

@achew22 The same for me. I've tried with an image of ubuntu, debian and fedora (latest versions). Any workarround to avoid this weird bug? Thank you all.

Edit: Not in fedora:latest, but when I try to run byobu (tmux wrapper), toolbox exits with the same message.

@spacepluk
Copy link

I'm getting the same error with pritunl/archlinux any time I try to install a package (e.g. pacman -S tmux). But I tried @achew22's test and that doesn't kill it.

@camerondavison
Copy link

There is a workaround linked several issues over. just copying it over to this issue since it took me a while to track it down again and the other issues are closed as dupes of this one.

Use the previous fedora tag

echo "TOOLBOX_DOCKER_TAG=24" >>$HOME/.toolboxrc

@ankon
Copy link

ankon commented Jan 10, 2017

When one actually needs Fedora 25 for whatever reasons, this workaround from #1676 (comment) worked for me:

rpm --import /etc/pki/rpm-gpg/RPM*

@vmarkovtsev
Copy link

There is another workaround: remove --share-system from systemd-nspawn command line. Somehow it propagates SIGKILL. I reference #1610 here

@ghost
Copy link

ghost commented Jan 27, 2017

I can also reproduce this on Container Linux by CoreOS stable (1235.6.0) running a Fedora 25 toolbox:

$ toolbox
[...]
# dnf -y install 'dnf-command(config-manager)'
[...]
Downloading Packages:
[SKIPPED] dnf-plugins-core-0.1.21-4.fc25.noarch.rpm: Already downloaded
[SKIPPED] python3-dnf-plugins-core-0.1.21-4.fc25.noarch.rpm: Already downloaded
warning: /var/cache/dnf/fedora-310f9d37d74ceec1/packages/dnf-plugins-core-0.1.21-4.fc25.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fdb19c98: NOKEY
Container core-fedora-latest terminated by signal KILL.

rpm --import /etc/pki/rpm-gpg/RPM*, as mentioned above #1216 (comment) by @ankon, works around the issue for official Fedora packages, but the issue surfaces again for third-party packages.

sed 's/--share-system//' -i toolbox && ./toolbox, as suggested by @vmarkovtsev above #1216 (comment), works around the issue for real.

An older installation of CoreOS stable (1068.10.0) running a Fedora 22 toolbox is also affected.

@dm0-
Copy link

dm0- commented Mar 8, 2017

I believe this is fixed in systemd v233. It should be in the alpha next week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants