Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

rm: "traversal failed" is not shown when 2nd getdents64 failed on broken device

Open
#15,206 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Franklin-Qi is already working on this.

Since Oct 9, 2026.

  • #15209 by @Franklin-Qi — open

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
cli

Research direction

Start by reproducing the bug with the strace fault injection in the issue (getdents64 returning EIO on the second call) against the uutils rm binary, and compare it with GNU rm's output. Read PR #15209 first, since it is already open against this issue and may already cover the fix. Done means the "traversal failed" message is printed when the second getdents64 fails, instead of the misleading "Directory not empty" error.

Written by the indexing model from the issue text.

Description

U - rm
$ mkdir -p dir/nonempty
$ strace -e trace=getdents64 -e fault=getdents64:error=EIO:when=2 '/home/a/bin/gnu9.12/rm' -Rf dir
getdents64(3, 0x55ea90f71890 /* 3 entries */, 32768) = 80
getdents64(3, 0x55ea90f71890, 32768)    = -1 EIO (Input/output error) (INJECTED)
getdents64(3, 0x55ea90f71890 /* 2 entries */, 32768) = 48
getdents64(3, 0x55ea90f71890 /* 0 entries */, 32768) = 0
rm: traversal failed: dir: Input/output error
+++ exited with 1 +++
$ mkdir -p dir/nonempty
$ strace -e trace=getdents64 -e fault=getdents64:error=EIO:when=2 rm -Rf dir
getdents64(3, 0x7ffda48701a8 /* 3 entries */, 8192) = 80
getdents64(3, 0x7ffda48701a8, 8192)     = -1 EIO (Input/output error) (INJECTED)
getdents64(3, 0x560de267a060 /* 3 entries */, 32768) = 80
rm: cannot remove 'dir': Directory not empty
+++ exited with 1 +++
Dominant language
Rust
Stars
24.3k
Forks
2.1k
Avg merge
2d 15m
Merged PRs (30d)
320

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.