You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rm: cannot remove '/tmp/tmp.i4z7SivxAR/incoming/pkg-deep-tree/[very deep tree]': Too many open files #7995
rm: cannot remove '/tmp/tmp.i4z7SivxAR/incoming/pkg-deep-tree/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x/x': Too many open files
This is caused by the standard library's remove_dir_all(). It's already tracked upstream that it cannot handle paths that are too long in rust-lang/rust#53339, but it seems like the recursive implementation is also leaving file handles open while traversing. A loop-based implementation was attempted in rust-lang/rust#88731, but was abandoned, and IIUC, any followup is blocked on rust-lang/rust#120426. If we remove the long name fallback logic entirely, the test works as expected. That was added in #7304, so pinging @jfinkels: I suspect the TODO there might fix this?
Activity
julian-klode commentedon May 26, 2025
Alternatively, run
./test/integration/test-apt-ftparchive-corner-casesin APT after building apt which creates said directory structure.jtracey commentedon May 26, 2025
This is caused by the standard library's
remove_dir_all(). It's already tracked upstream that it cannot handle paths that are too long in rust-lang/rust#53339, but it seems like the recursive implementation is also leaving file handles open while traversing. A loop-based implementation was attempted in rust-lang/rust#88731, but was abandoned, and IIUC, any followup is blocked on rust-lang/rust#120426. If we remove the long name fallback logic entirely, the test works as expected. That was added in #7304, so pinging @jfinkels: I suspect the TODO there might fix this?sylvestre commentedon May 26, 2025
i wonder how often is happening in real life
jfinkels commentedon Jun 26, 2025
Maybe this is a duplicate of #7324 ?
HackingRepo commentedon Jun 30, 2026
it now even worse
looks to me, it caused confusing directory not empty
julian-klode commentedon Jul 13, 2026
Yes now it gives up recursing at some random depth and then fails because that directory is not empty.
test: use `gnurm` where available
fix(rm): keep directory FD use O(1) on deep trees
fix(rm): hybrid DIR_FD_BUDGET for recursive walk
fix(rm): dual-mode FD headroom for deep recursive trees