This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vidartf
Recipients lilydjwg, serhiy.storchaka, vidartf, xtreak
Date 2020-09-22.10:41:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600771305.56.0.165538431378.issue35144@roundup.psfhosted.org>
In-reply-to
Content
On Python 3.8.5 on Windows using the code from the above patch I recently got a stack overflow:

Thread 0x00002054 (most recent call first):
  File "...\lib\concurrent\futures\thread.py", line 78 in _worker
  File "...\lib\threading.py", line 870 in run
  File "...\lib\threading.py", line 932 in _bootstrap_inner
  File "...\lib\threading.py", line 890 in _bootstrap

Thread 0x00000de4 (most recent call first):
  File "...\lib\concurrent\futures\thread.py", line 78 in _worker
  File "...\lib\threading.py", line 870 in run
  File "...\lib\threading.py", line 932 in _bootstrap_inner
  File "...\lib\threading.py", line 890 in _bootstrap

Current thread 0x00004700 (most recent call first):
  File "...\lib\tempfile.py", line 803 in onerror
  File "...\lib\shutil.py", line 619 in _rmtree_unsafe
  File "...\lib\shutil.py", line 737 in rmtree
  File "...\lib\tempfile.py", line 814 in _rmtree
  File "...\lib\tempfile.py", line 806 in onerror
  File "...\lib\shutil.py", line 619 in _rmtree_unsafe
  File "...\lib\shutil.py", line 737 in rmtree
  ... repeating

-------------------------------------------


In my case, the outer `exc_info` from rmtree is:

PermissionError(13, 'The process cannot access the file because it is being used by another process')


And the inner exception from `_os.unlink(path)` is:

PermissionError(13, 'Access is denied')



I would say that expected behavior in this case would be to let the 'file is in use' error raise, instead of killing the process with an SO.
History
Date User Action Args
2020-09-22 10:41:45vidartfsetrecipients: + vidartf, lilydjwg, serhiy.storchaka, xtreak
2020-09-22 10:41:45vidartfsetmessageid: <1600771305.56.0.165538431378.issue35144@roundup.psfhosted.org>
2020-09-22 10:41:45vidartflinkissue35144 messages
2020-09-22 10:41:45vidartfcreate