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 #3920, we ran into an issue on Windows (failing build) which results in bash erroring out with RuntimeError: indirect call type mismatch.
Steps To Reproduce
$ wasmer run-unstable sharrattj/[email protected] --entrypoint=bash -- -c "ls -l /usr/coreutils/*.md && ls -l /lib/python3.6/*.py"
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Capabilities insufficient
2023-05-30T14:28:02.202145Z WARN ThreadId(18) wasmer_wasix::syscalls::wasix::proc_exec: failed to create subprocess for fork - notcapable (error 76)
error: RuntimeError: indirect call type mismatch
at <unnamed> (<module>[583]:0x96372)
at <unnamed> (<module>[814]:0xc044c)
at <unnamed> (<module>[51]:0x846b)
╰─▶ 1: RuntimeError: indirect call type mismatch
at <unnamed> (<module>[583]:0x96372)
at <unnamed> (<module>[814]:0xc044c)
at <unnamed> (<module>[51]:0x846b)
Context
From what I've been able to find, resolving something relative to the the root directory (/) would hits an error branch because we call WasiFs::get_inode_at_path_inner() and in that part of the code component is Component::RootDir and we end up doing a lookup in entries with "\" as the key (in my test, it only contained "." and "/").
// Root is not capable of having something other then preopenned folders
returnErr(Errno::Notcapable);
I believe this Errno::Notcapable causes forking to fail, which means the caller (bash) goes down a different code path and triggers a RuntimeError: indirect call type mismatch.
match state.fs.get_current_dir(inodes,crate::VIRTUAL_ROOT_FD){
Ok(a) => a,
Err(err) => {
warn!("failed to create subprocess for fork - {}", err);
returnErr(WasiError::Exit(err.into()));
}
I'm not sure why we get a mismatched signature error. It may be that there was a long-standing bug, and we've never seen it before because forking has never failed. @john-sharratt may be a better person to talk to about it than me, though.
The text was updated successfully, but these errors were encountered:
In #3920, we ran into an issue on Windows (failing build) which results in bash erroring out with
RuntimeError: indirect call type mismatch
.Steps To Reproduce
Context
From what I've been able to find, resolving something relative to the the root directory (
/
) would hits an error branch because we callWasiFs::get_inode_at_path_inner()
and in that part of the codecomponent
isComponent::RootDir
and we end up doing a lookup inentries
with"\"
as the key (in my test, it only contained"."
and"/"
).wasmer/lib/wasi/src/fs/mod.rs
Lines 1140 to 1141 in 9c81cb8
I believe this
Errno::Notcapable
causes forking to fail, which means the caller (bash) goes down a different code path and triggers aRuntimeError: indirect call type mismatch
.wasmer/lib/wasi/src/syscalls/wasix/proc_exec.rs
Lines 68 to 73 in 9c81cb8
I'm not sure why we get a mismatched signature error. It may be that there was a long-standing bug, and we've never seen it before because forking has never failed. @john-sharratt may be a better person to talk to about it than me, though.
The text was updated successfully, but these errors were encountered: