[issue40143] shutil.rmtree will frequently fail on Windows under heavy load due to racy deletion

2020-04-03 Thread Eryk Sun
Eryk Sun added the comment: > It's inherently racy, since deleting a file on Windows *doesn't > actually delete it*, instead it marks the file for deletion. The > system will eventually get around to deleting it, but under heavy > load, this might be sometime after an attempt is made to

[issue40143] shutil.rmtree will frequently fail on Windows under heavy load due to racy deletion

2020-04-03 Thread Steve Dower
Steve Dower added the comment: What about renaming the base directory in place? Moving things across drives doesn't help, and we can't reasonably determine a suitable location for temp files other than by leaving them where they are. -- ___

[issue40143] shutil.rmtree will frequently fail on Windows under heavy load due to racy deletion

2020-04-01 Thread Alexander Riccio
New submission from Alexander Riccio : The "obvious" way to delete a directory tree on Windows is wrong. It's inherently racy, since deleting a file on Windows *doesn't actually delete it*, instead it marks the file for deletion. The system will eventually get around to deleting it, but