(Assumed) Race-condition leads to par-each
/rm
error
#12585
Labels
🐛 bug
Something isn't working
file-system
Related to commands and core nushell behavior around the file system
Describe the bug
I came across this when answering Question #12560, but I believe there are two issues at play. This is the first, and I believe it's probably an upstream issue in the
uutils/coreutils
rm
implementation.Given a directory that looks like:
An intermittent error (perhaps 1 in 10 tries on my system) will occur under the following conditions:
ls **/*
with apar-each
with arm -rf $in.name
This does not occur with
^rm rf $in.name
How to reproduce
Given it's intermittent, it's easiest to see by running multiple times:
Notes:
Eventually you'll see, amongst the results:
Note that:
rm thisFileDoesntExist
:rm -rf thisFileDoesntExist
should never fail under normal conditions, either in theuutils/coreutils
version or Gnu.Expected behavior
No error. As mentioned, the problem doesn't occur with the external
rm
:Screenshots
No response
Configuration
Additional context
I assume that this is a race condition while
rm -rf foo
is being processed:foo
directory.rm -rf foo/fru
completes between steps 1 and 3.rm -rf foo
fails when it attempts to removefoo/fru
.Again, if this is the case, it's probably an upstream issue.
The text was updated successfully, but these errors were encountered: