Skip to content

trickfs: move to fuser 0.18 to avoid the libfuse 3.18 mount race - #990

Merged
rphmeier merged 1 commit into
thrumdev:masterfrom
citizen-stig:nikolai/fix-fuse-ubuntu-26.04
Nov 18, 2026
Merged

rphmeier merged 1 commit into
thrumdev:masterfrom
citizen-stig:nikolai/fix-fuse-ubuntu-26.04

Conversation

@citizen-stig

Copy link
Copy Markdown
Contributor

pin CI to ubuntu-26.04

libfuse >= 3.18 passes the fusermount3 control socket by setenv()-ing _FUSE_COMMFD in the process-wide environment and then posix_spawn()-ing the helper with environ. Concurrent mounts from parallel test threads overwrite each other's value, so a helper gets the wrong fd ("file descriptor N is not a socket"), mounts fail with EPERM or end up handed to the wrong session (ENOTCONN), and a caller can wait forever for an fd that never arrives. Ubuntu 26.04 ships libfuse 3.18, hence #984.

fuser 0.16+ mounts in pure Rust on Linux and sets _FUSE_COMMFD only on the spawned helper, so the race cannot happen and libfuse is no longer linked. Port trickfs to the 0.18 API: &self Filesystem methods (state behind a Mutex), newtype parameters, Errno, and the Config mount API with an explicit RootAndOwner ACL for auto_unmount.

fuser 0.18.0 does not unmount an auto_unmount session on teardown, so umount_and_join() hangs (fixed upstream in cberner/fuser@172815c, not released). Unmount via fusermount3 -u -z before joining until a fuser release has the fix. Tests now unmount and join instead of dropping the session, and mmap_test unmaps its mapping, which otherwise pinned the lazily unmounted file system.

CI: run every job on ubuntu-26.04 (reverting the ubuntu-24.04 pin) and install only fuse3 for fusermount3; libfuse headers are no longer needed.

Fixes #984

… CI to ubuntu-26.04

libfuse >= 3.18 passes the fusermount3 control socket by setenv()-ing
_FUSE_COMMFD in the process-wide environment and then posix_spawn()-ing
the helper with `environ`. Concurrent mounts from parallel test threads
overwrite each other's value, so a helper gets the wrong fd ("file
descriptor N is not a socket"), mounts fail with EPERM or end up handed
to the wrong session (ENOTCONN), and a caller can wait forever for an fd
that never arrives. Ubuntu 26.04 ships libfuse 3.18, hence thrumdev#984.

fuser 0.16+ mounts in pure Rust on Linux and sets _FUSE_COMMFD only on
the spawned helper, so the race cannot happen and libfuse is no longer
linked. Port trickfs to the 0.18 API: `&self` Filesystem methods (state
behind a Mutex), newtype parameters, Errno, and the Config mount API with
an explicit RootAndOwner ACL for auto_unmount.

fuser 0.18.0 does not unmount an auto_unmount session on teardown, so
umount_and_join() hangs (fixed upstream in cberner/fuser@172815c, not
released). Unmount via `fusermount3 -u -z` before joining until a fuser
release has the fix. Tests now unmount and join instead of dropping the
session, and mmap_test unmaps its mapping, which otherwise pinned the
lazily unmounted file system.

CI: run every job on ubuntu-26.04 (reverting the ubuntu-24.04 pin) and
install only `fuse3` for fusermount3; libfuse headers are no longer
needed.

Fixes thrumdev#984

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wb3qGzNg3a3DrMB5cQJY2
@rphmeier
rphmeier merged commit 64bde5f into thrumdev:master Nov 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trickfs: FUSE tests fail/hang on ubuntu-26.04 (libfuse3 3.18)

2 participants