Skip to content

ENOSYS for fork/pipe/socket/chmod/symlink/copy_file_range blocks POSIX-style CLI workloads; one startup path jumps through a NULL stub #13

Description

@yspbwx2010

Context: full C++23 modules workspace (7 members, ~2k compile units) now
compiles and links statically via the native path (mcpp v2026.8.26.2 +
openkal-llvm-runtime@0.1.3 + openkal-linux@0.5.4 + openkal-musl@0.3.5,
x86_64-linux-musl). Zero PT_INTERP — the compile/link line is in good
shape. The runtime line is where we hit a wall: our test suite runs 94
cases; 67 pass, 27 fail, and every failure reduces to a kernel-layer gap.

ENOSYS inventory (from test failures, deduplicated)

syscall surface observed failure
fork "fork failed: Function not implemented" — no subprocess can be spawned
pipe / pipe2 "pipe2 failed: Function not implemented"; stdout capture pipes fail
socket listen (bind/listen/accept) local HTTP callback server cannot start on any port
chmod / mode bits on create files expected 0600 land 0777; dirs expected 0700 land 0777
symlink / symlinkat std::filesystem::create_symlink / create_directory_symlink → ENOSYS
copy_file_range (or sendfile) std::filesystem::copy_file → ENOSYS

Also observed: std::filesystem::last_write_time on a directory returns
"Is a directory". The produced binary SIGSEGVs during early terminal-UI
initialization (after spawning threads): gdb shows PC=0 with an empty
backtrace — a call through a NULL function pointer, i.e. some stub in the
kernel/libc layer is a null pointer rather than an ENOSYS-returning
function. A stub table entry that returns -ENOSYS consistently would at
least let programs fail gracefully.

For an interactive CLI that shells out (the classic
fork/exec/pipe/waitpid loop), the current surface is not yet sufficient.
Is fuller POSIX process/socket/fs coverage on the roadmap for
openkal-linux, or is the intended scope embedded/compute workloads? Happy
to contribute test cases or a syscall-by-syscall reproduction list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions