When a subporcess command fails, the local test runner may try to cleanup temp
files before the one used as the stdout pipe gets released by the other process
(easier to reproduce on Windows)...
For example:
D:\src\swarming\src>python local_test_runner.py -v -f sample_run.swarm
root : INFO Test case: My First Swarm Test Case starting to download
data
root : INFO Downloading: D:\src\swarming\src\print_a_lot.zip from
http://swarming.googlecode.com/files/print_a_lot.zip
root : INFO Running tests from My First Swarm Test Case test case
root : INFO Test Print 10*.1 second
root : ERROR Execution of ['blu', 'python', '-u', 'print_a_lot.py',
'-t 0.1', '-n 10'] raised exception: [Error 2] The system cannot find the file
specified.
Traceback (most recent call last):
File "local_test_runner.py", line 346, in _RunCommand
stdin=subprocess.PIPE)
File "D:\src\depot_tools\python_bin\lib\subprocess.py", line 595, in __init__
errread, errwrite)
File "D:\src\depot_tools\python_bin\lib\subprocess.py", line 804, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
root : ERROR [Error 32] The process cannot access the file because it
is being used by another process:
'c:\\users\\mad\\appdata\\local\\temp\\tmpvps5kq'
Traceback (most recent call last):
File "local_test_runner.py", line 637, in main
(success, result_codes, result_string) = runner.RunTests()
File "local_test_runner.py", line 487, in RunTests
env=dict(test_env_vars))
File "local_test_runner.py", line 350, in _RunCommand
CleanupTempFiles()
File "local_test_runner.py", line 332, in CleanupTempFiles
os.remove(stdout_file_name)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\users\\mad\\appdata\\local\\temp\\tmpvps5kq'
Original issue reported on code.google.com by mad@chromium.org on 7 Sep 2011 at 12:55
Original issue reported on code.google.com by
mad@chromium.org
on 7 Sep 2011 at 12:55