New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
achew22 opened this Issue Apr 11, 2016 · 10 comments

Comments

Projects
None yet
9 participants
@achew22

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

This comment has been minimized.

Show comment
Hide comment
@crawford

crawford Apr 21, 2016

Member

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

Member

crawford commented Apr 21, 2016

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

@achew22

This comment has been minimized.

Show comment
Hide comment
@achew22

achew22 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.

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

This comment has been minimized.

Show comment
Hide comment
@crawford

crawford May 10, 2016

Member

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?

Member

crawford commented May 10, 2016

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

This comment has been minimized.

Show comment
Hide comment
@daper

daper 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.

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

This comment has been minimized.

Show comment
Hide comment
@spacepluk

spacepluk Jul 23, 2016

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.

spacepluk commented Jul 23, 2016

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

This comment has been minimized.

Show comment
Hide comment
@camerondavison

camerondavison Jan 10, 2017

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

camerondavison commented Jan 10, 2017

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

This comment has been minimized.

Show comment
Hide comment
@ankon

ankon 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*

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

This comment has been minimized.

Show comment
Hide comment
@vmarkovtsev

vmarkovtsev Jan 16, 2017

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

vmarkovtsev commented Jan 16, 2017

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

@urzds

This comment has been minimized.

Show comment
Hide comment
@urzds

urzds 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.

urzds 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-

This comment has been minimized.

Show comment
Hide comment
@dm0-

dm0- Mar 8, 2017

Member

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

Member

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 join this conversation on GitHub. Already have an account? Sign in to comment