wasmerio/wasmer · error · panic
state::get_inode_at_path unknown file type: not file, direct
Error message
state::get_inode_at_path unknown file type: not file, directory, or symlink
What it means
In get_inode_at_path, the non-unix build path for resolving on-disk directory entries only implements file/directory/symlink classification; on any other platform, encountering such an entry hits unimplemented! with a message saying only file, directory, or symlink are supported. It is a platform-coverage gap: the unix branch handles char/block devices, fifos, and sockets, the non-unix branch does not.
Source
Thrown at lib/wasix/src/fs/mod.rs:1528
handle: None,
path: entry_path_buf,
fd: None,
},
name: entry_path.into(),
entry_name,
stat: Filestat {
st_filetype: file_type,
st_ino: Inode::from_path(path_str).as_u64(),
st_size: metadata.len(),
st_ctim: metadata.created(),
st_mtim: metadata.modified(),
st_atim: metadata.accessed(),
..Filestat::default()
},
}
}
#[cfg(not(unix))]
unimplemented!(
"state::get_inode_at_path unknown file type: not file, directory, or symlink"
);
}
} // end of non-ephemeral entry case
} // end of Kind::Dir match case
} // end of match
}; // end of component_resolution block
// 2. Create an INode and update directory entries
// --
// The cur_inode is definitely a directory (Kind::Dir) at this
// stage, and we need to create an inode (new_inode) and cache
// as an entry in current directory (entry_name => cur_inode).
let (entry_name, new_inode, should_insert, should_return) =
match component_resolution {
ComponentResolution::Create {
kind,
name,View on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Ensure only regular files, directories, and symlinks exist in host directories shared with the guest on non-unix platforms.
- Filter/skip unsupported entry types when building the FS view on non-unix targets.
- Port the unix classification logic (char/block/fifo/socket) to the non-unix branch.
- Change the arm to return Errno::Notsup instead of panicking for unsupported types.
Example fix
// before
#[cfg(not(unix))]
unimplemented!("state::get_inode_at_path unknown file type ...");
// after
#[cfg(not(unix))]
return Err(Errno::Notsup); Defensive patterns
Strategy: validation
Validate before calling
// non-unix: only allow file/dir/symlink entries before path resolution
#[cfg(not(unix))]
fn entry_supported(ft: std::fs::FileType) -> bool {
ft.is_file() || ft.is_dir() || ft.is_symlink()
} Try / catch
let resolved = std::panic::catch_unwind(|| state.get_inode_at_path(dir, path))
.map_err(|_| Errno::Notsup)?; Prevention
- On Windows, only share directories containing regular files/dirs/symlinks
- Filter out junctions, named pipes, and device files during FS setup on non-unix targets
- Run the FS test suite on all target platforms in CI
When it happens
Trigger: Building/running on a non-unix target (e.g. Windows) and resolving a path whose entry is not a plain file, directory, or symlink (device files, reparse points not classified as symlinks, sockets, etc.).
Common situations: Windows hosts exposing directories containing device files, named pipes, junctions, or other special entries to a guest; cross-platform test suites that pass on unix but panic on windows.
Related errors
- state::get_inode_at_path for buffers
- state::get_inode_at_path unknown file type: not file, direct
- wasi::platform_clock_time_get(wasi::Clockid::ProcessCputimeI
- wasi::platform_clock_time_get(wasi::Clockid::ThreadCputimeId
- wasi::path_unlink_file for Buffer
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/0379650d38670e9a.
Report an issue: GitHub.