[PR #568] fix: prevent panic on repeated EINTR errors during filesystem scanning #553

Open
opened 2026-06-08 11:29:21 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bootandy/dust/pull/568
Author: @hieuit095
Created: 4/2/2026
Status: 🔄 Open

Base: masterHead: main


📝 Commits (1)

  • 26a7404 Prevent panic on repeated EINTR errors by gracefully skipping problematic directories

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 src/dir_walker.rs (+5 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bootandy/dust/pull/568 **Author:** [@hieuit095](https://github.com/hieuit095) **Created:** 4/2/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `main` --- ### 📝 Commits (1) - [`26a7404`](https://github.com/bootandy/dust/commit/26a7404aa0e6638ef88cfc3b1ce5b097a8ba6863) Prevent panic on repeated EINTR errors by gracefully skipping problematic directories ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/dir_walker.rs` (+5 -1) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-06-08 11:29:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#553