Repository navigation
fuse: SIGBUS a DLM fault on an aborted connection instead of retrying - #253
Merged
hbirth merged 1 commit intoOct 12, 2026
Conversation
With the writeback cache and DLM, fuse_filemap_fault()'s slow path drops the fault lock, takes the DLM grant and reads the batch window into private folios, and returns VM_FAULT_RETRY. Errors on that path are ignored. Its comment expects a persistent error to end on the blocking path, which turns it into SIGBUS. Since 9f312f3 ("fuse: drop fault-around for shared-writable mappings under DLM") a FAULT_FLAG_TRIED pass takes the drop-and-retry path too, so a retried fault that keeps failing never gets there. Once the fault lock is dropped, VM_FAULT_RETRY is the only answer the fault can give. An aborted connection fails every request, so a task touching a non-resident page of a mapping on that mount refaults forever. It spends all its time in the kernel, ignores every signal but SIGKILL, and its mapping keeps the mount busy, so the mount cannot be unmounted and recovered. This was seen after the redfsd hang watchdog aborted a hung connection: four fio mmap jobs ran at 100% CPU for minutes, each pass allocating and freeing the batch folios in fuse_fault_read_private_folios(), and the client agent's umount failed with EBUSY until they were killed. Check the connection on the slow path while the fault lock is still held, and return VM_FAULT_SIGBUS when it is gone, which is what a fault on a non-resident page of an aborted mount returns without DLM. Resident pages with a recorded grant still map through the fast path. A persistent error on a live connection, such as a server that fails every READ, still loops the same way. Ending that needs state carried from one retry to the next and is left out here. Signed-off-by: Sven Oehme <soehme@ddn.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hbirth
approved these changes
Oct 12, 2026
hbirth
pushed a commit
that referenced
this pull request
Oct 13, 2026
With the writeback cache and DLM, fuse_filemap_fault()'s slow path drops the fault lock, takes the DLM grant and reads the batch window into private folios, and returns VM_FAULT_RETRY. Errors on that path are ignored. Its comment expects a persistent error to end on the blocking path, which turns it into SIGBUS. Since 52b0cfb ("fuse: drop fault-around for shared-writable mappings under DLM") a FAULT_FLAG_TRIED pass takes the drop-and-retry path too, so a retried fault that keeps failing never gets there. Once the fault lock is dropped, VM_FAULT_RETRY is the only answer the fault can give. An aborted connection fails every request, so a task touching a non-resident page of a mapping on that mount refaults forever. It spends all its time in the kernel, ignores every signal but SIGKILL, and its mapping keeps the mount busy, so the mount cannot be unmounted and recovered. This was seen after the redfsd hang watchdog aborted a hung connection: four fio mmap jobs ran at 100% CPU for minutes, each pass allocating and freeing the batch folios in fuse_fault_read_private_folios(), and the client agent's umount failed with EBUSY until they were killed. Check the connection on the slow path while the fault lock is still held, and return VM_FAULT_SIGBUS when it is gone, which is what a fault on a non-resident page of an aborted mount returns without DLM. Resident pages with a recorded grant still map through the fast path. A persistent error on a live connection, such as a server that fails every READ, still loops the same way. Ending that needs state carried from one retry to the next and is left out here. This is a port to Linux 6.12 of commit 37a9748 from redfs-ubuntu-hwe-6.17.0-16.16-24.04.1 (PR #253); the code is identical on both branches and the patch applied with only a line offset. Signed-off-by: Sven Oehme <soehme@ddn.com> Signed-off-by: Allison Henderson <ahenderson@ddn.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes RED-51342.
With the writeback cache and DLM, the slow path of
fuse_filemap_fault()drops the fault lock, does its blocking work, and returnsVM_FAULT_RETRY. Errors on that path are ignored. Since 9f312f3, aFAULT_FLAG_TRIEDpass takes that path too, so a fault that keeps failing never reaches the blocking path, which is what would turn the error into SIGBUS. On an aborted connection every READ fails, so a task touching a non-resident page of a mapping refaults forever. It burns CPU, only SIGKILL ends it, and its mapping keeps the mount busy.This was seen on tyan-h3-u24 after the redfsd hang watchdog aborted a hung connection. Four fio mmap jobs ran at 100% system time for over 5 minutes; perf showed them looping through
fuse_fault_read_private_folios(). The client agent'sumountfailed with "target is busy" until they were killed with SIGKILL.The fix checks
fc->connectedon the slow path while the fault lock is still held, and returnsVM_FAULT_SIGBUSwhen the connection is gone. Resident pages with a recorded grant still map through the fast path.Not covered: a persistent error on a live connection, such as a server that fails every READ, still loops. Ending that needs state carried from one retry to the next, and I'd like your view on how to carry it.
Testing
Built as redfs.ko (
contrib/redfs.kosrc/6.17.0-16.16.ubuntuwith this patch) against 6.17.0-42-generic on tyan-h3-u24, with no warnings or errors. Loaded it there and reran the same test: the fio repro of RED-50931 (buffered randrw with fsync, mmap randrw, and O_DIRECT randwrite on the same files), with the redfsd hang watchdog aborting the connection.got signal=7)umountredfs-rhel10_0carries the same code and needs the same change; it will come in a separate PR.🤖 Generated with Claude Code