Skip to content

fix: prevent panic on repeated EINTR errors during filesystem scanning#568

Open
hieuit095 wants to merge 1 commit intobootandy:masterfrom
hieuit095:main
Open

fix: prevent panic on repeated EINTR errors during filesystem scanning#568
hieuit095 wants to merge 1 commit intobootandy:masterfrom
hieuit095:main

Conversation

@hieuit095
Copy link
Copy Markdown

@hieuit095 hieuit095 commented Apr 2, 2026

When dust scans filesystems that return many EINTR errors (e.g., network filesystems like NFS or FUSE-based mounts), the previous code called panic after 999 consecutive interrupts, crashing the program. Replaced the panic with a warning message on stderr and a graceful skip of the problematic directory, allowing the scan to continue with remaining accessible paths.

Changes: src/dir_walker.rs - in handle_error_and_retry(), panic replaced with eprintln warning and return false when interrupted_error exceeds 999.

All 29 unit tests and 28 integration tests pass.

…atic directories

When scanning filesystems that generate many EINTR errors (e.g., network
filesystems like NFS, FUSE, or containers with certain volume mounts),
the previous code would panic after 999 interrupts. This replaces the
panic with a graceful skip: the problematic directory is omitted from
results and scanning continues. Users see a warning message on stderr
instead of a crash.

Fixes: repeated EINTR errors causing dust to abort on network filesystems
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.

1 participant