Skip to content
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

Unable to forward interrupt signal #863

Closed
1 of 5 tasks
ViBiOh opened this issue Nov 14, 2023 · 4 comments
Closed
1 of 5 tasks

Unable to forward interrupt signal #863

ViBiOh opened this issue Nov 14, 2023 · 4 comments

Comments

@ViBiOh
Copy link

ViBiOh commented Nov 14, 2023

Description

I've updated colima to the latest version and since I can't kill a container when running in attached or detached mode.

Example of logs when starting a simple redis locally in attached mode.

username@macbook ~> colima --version
colima version 0.6.2
username@macbook ~> colima start --runtime=containerd
INFO[0000] starting colima
INFO[0000] runtime: containerd
INFO[0000] preparing network ...                         context=vm
INFO[0000] creating and starting ...                     context=vm
INFO[0091] provisioning ...                              context=containerd
INFO[0101] starting ...                                  context=containerd
INFO[0158] done
username@macbook ~> colima nerdctl install --path "${HOME}/opt/bin/docker" --force
username@macbook ~> which docker
/Users/username/opt/bin/docker
username@macbook ~> docker run --name "redis" --rm --publish "127.0.0.1:6379:6379" "redis" redis-server --save "" --appendonly no
1:C 14 Nov 2023 13:42:01.639 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:C 14 Nov 2023 13:42:01.639 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 14 Nov 2023 13:42:01.639 * Redis version=7.2.3, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 14 Nov 2023 13:42:01.639 * Configuration loaded
1:M 14 Nov 2023 13:42:01.640 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
1:M 14 Nov 2023 13:42:01.640 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 14 Nov 2023 13:42:01.640 # Current maximum open files is 1024. maxclients has been reduced to 992 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
1:M 14 Nov 2023 13:42:01.640 * monotonic clock: POSIX clock_gettime
1:M 14 Nov 2023 13:42:01.640 * Running mode=standalone, port=6379.
1:M 14 Nov 2023 13:42:01.641 * Server initialized
1:M 14 Nov 2023 13:42:01.641 * Ready to accept connections tcp
^CERRO[0011] forward signal interrupt                      error="unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied\n: unknown"
^CERRO[0014] forward signal interrupt                      error="unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied\n: unknown"

Hitting ctrl+c result in the last two error message. I cannot detached from the container, I'm stuck in it. The only way to get back to the prompt is by killing the colima instance.

Overall, it seems that starting the colima instance if very slower than usual (usually around 20s, now it's more 2 minutes).

Version

colima version 0.6.2
git commit: 22d7e5fbc86d5b8e3b27065a762800bc7960a0ff
limactl version 0.18.0
qemu-img version 8.1.2

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

I've tested both with default mount type and with the experimental vz/virtiofs (colima start --runtime=containerd --vm-type vz --mount-type virtiofs) with the same result on both.

> colima status
INFO[0001] colima is running using macOS Virtualization.Framework
INFO[0002] arch: x86_64
INFO[0002] runtime: containerd
INFO[0002] mountType: virtiofs

Reproduction Steps

As described in the initial logs, create a brand new VM with containerd, start a container in attached mode and try to stop it.

Expected behaviour

Killing a container should work when hitting ctrl+c, passing it to the container, as before.

Additional context

No response

@abiosoft
Copy link
Owner

Hitting ctrl+c result in the last two error message. I cannot detached from the container, I'm stuck in it. The only way to get back to the prompt is by killing the colima instance.

Actually you can kill the container via nerdctl.

nerdctl ps # to get the name/id of the container
nerdctl kill <container-name>

@abiosoft
Copy link
Owner

I have successfully reproduced this. Not even nerdctl kill was able to shut it down, until a containerd restart.

I did get a similar experience with docker i.e. Ctrl-C not terminating the container.
However, docker kill was able to terminate the container.

@abiosoft
Copy link
Owner

Can you try with the current development version?

brew install --HEAD colima

It should be fixed now

@ViBiOh
Copy link
Author

ViBiOh commented Nov 19, 2023

I no longer have access to an Intel-based macOS but on my Apple Silicon with the same configuration it seems to work now, thank you 👍

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

No branches or pull requests

2 participants