Skip to content

safe-fs Python: virtual device stat omits uid/gid and fails native os.stat #777

Description

@kamilio

With Safe Bash / Safe FS 0.1.684, the custom JSPI Pyodide executor fails native os.stat('/dev/null'):

OSError: [Errno 61] canonical identity or required stat metadata unavailable: '/dev/null'

Reproduced in workerd/Miniflare against an injected authoritative filesystem. Normal native file stat and null descriptor I/O work.

DeviceFileSystem supplies synthetic ino, dev, nlink, size and times for /dev/null and /dev, but omits uid/gid. Python's stat projection requires both and rejects the result. Please provide complete stable virtual-device metadata for path stat/lstat and descriptor fstat, keeping virtual-device identity separate from backing filesystem identity. Add actual native Python tests for os.stat, os.lstat, and os.fstat(os.open('/dev/null', ...)) and /dev metadata.

This is separate from closed #756, which fixed descriptor open/read/write.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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