-
Notifications
You must be signed in to change notification settings - Fork 84
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
Process crashes and hangs if invalid entrypoint provided #326
Comments
Interesting. We probe for Linux entrypoint in https://github.com/containerd/runwasi/blob/main/crates/containerd-shim-wasm/src/sys/unix/container/executor.rs#L87C1-L106 as you pointed out, and if that fails, we probe for a wasm entrypoint here https://github.com/containerd/runwasi/blob/main/crates/containerd-shim-wasm/src/container/engine.rs#L22-L37. If that also fails, we tell libcontainer that we can't handle that container. I don't see where it might be getting stuck. |
Ok, I see a slightly different behaviour. I also noticed that after the first run, there's a dangling containerd-shim-wasmtime-v1 process. I also tested with plain youki, and it always errors immediately, so the dangling process is due to something we are (not?) doing. |
Ok, I did some more debuggging. |
this should be resolved in #340. some future improvements could be #342 and containers/youki#2389 and are being tracked independently |
Using the lastest commit
commit df35a387799248b3e82b52609890d02f58a411e5
Pass an invalid entrypoint and the process hangs for ~30 seconds eventually spitting out the error
Others("failed to receive. \"waiting for init ready\". BrokenChannel")
. During which time no logs are output to containerds log stream.Running it a second time and the process hangs indefinitely.
analysis
Was able to track that down to the failed process earlier where it didn't clean up properly ending up with
I've tracked this error down
"failed to receive. \"waiting for init ready\". BrokenChannel"
to https://github.com/containers/youki/blob/57ffefe89318df1cd1d1487c3cbcd4576a2d4dea/crates/libcontainer/src/process/channel.rs#L166-L173I believe reason for the first "init ready" is somewhere in
https://github.com/containerd/runwasi/blob/main/crates/containerd-shim-wasm/src/sys/unix/container/executor.rs#L87C1-L106
and it not handling the errors properly. Not sure if this is libcontainer or runwasi handling it wrong.
The text was updated successfully, but these errors were encountered: