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

Issue with handling signals in containers #755

Open
jprendes opened this issue Dec 2, 2024 · 0 comments
Open

Issue with handling signals in containers #755

jprendes opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jprendes
Copy link
Collaborator

jprendes commented Dec 2, 2024

We currently use tokio for the communication with containerd in the shim.
Many of the shims built on top of runwasi also use tokio, for example the wasmtime shim.
With our current implementation tokio::signal is broken for wasm containers created by runwasi shims.

The reason for this is a bit involved.
With our current implementation, a container inherits the global state of the shim when the container is created.
Tokio's signal handling depends on some global state, and in particular uses the self pipe trick.
This means that the pipe used for handling signals will be shared by the shim and all the wasm containers spawned by it.
We currently don't do any special signal handling inside of the shim, so this doesn't affect us where there's one container per shim.
The problem appears when one shim is managing more than one container.

@Mossaka Mossaka added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants