rm: "traversal failed" is not shown when 2nd getdents64 failed on broken device
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 25/100
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
$ 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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/coreutils
-
minorbug(mv): invalid mode errors not quotedPossibly taken @henrimarconni claimed this 2 days ago. OpenU - mv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
ptx: break file missing path in error messagePossibly taken @Franklin-Qi claimed this 2 days ago. OpenU - ptx
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
uutils/coreutils#15307 · 1 comment ·
Maintainers usually reply within 1 day
-
minorbug(stat): os errno not stripped when failing to flush stdoutPossibly taken @cestercian claimed this 9 days ago. OpenU - stat
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
uutils/coreutils#15200 · 3 comments ·
Maintainers usually reply within 1 day
-
stty: support B460800 and B921600 baud ratesPossibly taken @oech3 claimed this 5 days ago. Openawaiting upstream U - stty
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
B - high priority U - du
Difficulty 1/5 Under an hour Newbie friendliness 82/100
uutils/coreutils#14984 · 1 comment ·
Maintainers usually reply within 1 day
All issues in uutils/coreutils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
521xueweihan/HelloGitHub#4023 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/pingora#1055 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day