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
Several of the AppVeyor test runs are randomly erroring out in get_test_subprocess with errors like:
======================================================================
ERROR: setUpClass (test_windows.WindowsSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\psutil\psutil\tests\test_windows.py", line 68, in setUpClass
cls.pid = get_test_subprocess().pid
File "c:\projects\psutil\psutil\tests\__init__.py", line 209, in get_test_subprocess
os.remove(TESTFN)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\projects\\psutil\\$testfile'
I'm just making this placeholder issues for it to say that I'm working on fixing this; will add a PR when I'm fairly confident it's fixed.
The text was updated successfully, but these errors were encountered:
Oh yeah. That's a race condition / timing issue.
We need to first safe_remove() the file before running the subprocess, then retry a bunch of times in case of error == 32.
A better alternative would be to use some other synchronization mechanism other than a file, like a signal, but I'm not sure whether that can be done on Windows as historically it implements signals very poorly.
Several of the AppVeyor test runs are randomly erroring out in
get_test_subprocess
with errors like:I'm just making this placeholder issues for it to say that I'm working on fixing this; will add a PR when I'm fairly confident it's fixed.
The text was updated successfully, but these errors were encountered: