You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In youki we expect that executor.exec will not return if the exec is successful. This behavior is consistent for tradition containers, where we do an exec syscall and replace process image, thus never returning from exec call. However for wasm workloads our exec implementation does return, and causes crash as it reaches the unreachable! statement. We can either allow the executor to return, or just do a process.exit with exit code from wasm code in our wasm executors to conform it to traditional containers.
Printing args
1
2
3
Printing envs
("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
("TERM", "xterm")
("container", "podman")
("HOSTNAME", "b569c0459007")
thread 'main' panicked at crates/libcontainer/src/process/container_init_process.rs:644:5:
internal error: entered unreachable code: the executor should not return if it is successful.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expectation
Youki should not crash in this way. The exit should be graceful, i.e. with a proper exit code (non-zero in case of wasm module returning non-zero exit)
System and Setup Info
N/A , should be reproducible on all systems
Additional Context
FYI, if a new contributor is interested in taking this , ping me (@YJDoc2 ) for help before starting!
The text was updated successfully, but these errors were encountered:
Context for this is - for normal binaries we use exec syscall so that process image is replcaed by that binary. For wasm, we use wasm runtimes which execute the wasm file. Unlike binary here we do not replcae the process image so after the runtime is done executing, it returns and causes the error. So in the main wasm executor implementation we want to take the exit code returned by those runtime and basically do a process.exit with that exit code.
@YJDoc2 Thanks for sharing contexts! My new PC has arrived, I just started using a Linux desktop machine from today. So I can finally tackle this issue. I need an additional bit of time, but I will do this for sure.
Bug Description
In youki we expect that
executor.exec
will not return if the exec is successful. This behavior is consistent for tradition containers, where we do an exec syscall and replace process image, thus never returning from exec call. However for wasm workloads ourexec
implementation does return, and causes crash as it reaches theunreachable!
statement. We can either allow the executor to return, or just do aprocess.exit
with exit code from wasm code in our wasm executors to conform it to traditional containers.Steps to Reproduce
Follow https://containers.github.io/youki/user/webassembly.html to create a wasm container and run it. It will run, but in the end it will error saying -
Expectation
Youki should not crash in this way. The exit should be graceful, i.e. with a proper exit code (non-zero in case of wasm module returning non-zero exit)
System and Setup Info
N/A , should be reproducible on all systems
Additional Context
FYI, if a new contributor is interested in taking this , ping me (@YJDoc2 ) for help before starting!
The text was updated successfully, but these errors were encountered: