{"record":{"id":"0379650d38670e9a","repo":"wasmerio/wasmer","slug":"state-get-inode-at-path-unknown-file-type-not-fi-037965","errorCode":null,"errorMessage":"state::get_inode_at_path unknown file type: not file, directory, or symlink","messagePattern":"state::get_inode_at_path unknown file type: not file, directory, or symlink","errorType":"panic","errorClass":"panic","httpStatus":null,"severity":"error","filePath":"lib/wasix/src/fs/mod.rs","lineNumber":1528,"sourceCode":"                                                handle: None,\n                                                path: entry_path_buf,\n                                                fd: None,\n                                            },\n                                            name: entry_path.into(),\n                                            entry_name,\n                                            stat: Filestat {\n                                                st_filetype: file_type,\n                                                st_ino: Inode::from_path(path_str).as_u64(),\n                                                st_size: metadata.len(),\n                                                st_ctim: metadata.created(),\n                                                st_mtim: metadata.modified(),\n                                                st_atim: metadata.accessed(),\n                                                ..Filestat::default()\n                                            },\n                                        }\n                                    }\n                                    #[cfg(not(unix))]\n                                    unimplemented!(\n                                        \"state::get_inode_at_path unknown file type: not file, directory, or symlink\"\n                                    );\n                                }\n                            } // end of non-ephemeral entry case\n                        } // end of Kind::Dir match case\n                    } // end of match\n                }; // end of component_resolution block\n\n                // 2. Create an INode and update directory entries\n                // --\n                // The cur_inode is definitely a directory (Kind::Dir) at this\n                // stage, and we need to create an inode (new_inode) and cache\n                // as an entry in current directory (entry_name => cur_inode).\n                let (entry_name, new_inode, should_insert, should_return) =\n                    match component_resolution {\n                        ComponentResolution::Create {\n                            kind,\n                            name,","sourceCodeStart":1510,"sourceCodeEnd":1546,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/wasix/src/fs/mod.rs#L1510-L1546","documentation":"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.","triggerScenarios":"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.).","commonSituations":"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.","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."],"exampleFix":"// before\n#[cfg(not(unix))]\nunimplemented!(\"state::get_inode_at_path unknown file type ...\");\n\n// after\n#[cfg(not(unix))]\nreturn Err(Errno::Notsup);","handlingStrategy":"validation","validationCode":"// non-unix: only allow file/dir/symlink entries before path resolution\n#[cfg(not(unix))]\nfn entry_supported(ft: std::fs::FileType) -> bool {\n    ft.is_file() || ft.is_dir() || ft.is_symlink()\n}","typeGuard":null,"tryCatchPattern":"let resolved = std::panic::catch_unwind(|| state.get_inode_at_path(dir, path))\n    .map_err(|_| Errno::Notsup)?;","preventionTips":["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"],"tags":["wasix","filesystem","windows","unimplemented"],"backgroundTag":"unsupported-inode-kind","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}