Use unique temp file for stripped executable in hash.py to avoid races
Concurrent test workers can share the same executable path; using a per-invocation temp file (instead of a fixed .stripped suffix) prevents intermittent "No such file or directory" errors when one worker strips/cleans up while another reads the same path.
Request review from @MatzeB
@MatzeB Gentle Reminder. Please let me know if I should request someone else for this.
Request review from @wangpc-pp
The code looks good to me. I am just wondering when one worker will strip/clean up the executable. I haven't met such error before.
The code looks good to me. I just am wondering when one worker will strip/clean up the executable. I haven't met such error before.
May be it only happens with certain config, we are seeing it in our downstream CI builds. Shall I try to create a small example trying to reproduce the error?
The code looks good to me. I just am wondering when one worker will strip/clean up the executable. I haven't met such error before.
May be it only happens with certain config, we are seeing it in our downstream CI builds. Shall I try to create a small example trying to reproduce the error?
Yes. If the upstream can't reproduce the error, then we'd better to keep this change downstream. :-)
I haven't seen this before on our LNT configuration but I guess this makes sense, on LNT we run the benchmarks with -j1 so we wouldn't get the race conditions
Do you know what benchmarks/tests we have that share an executable within the test-suite?
I haven't seen this before on our LNT configuration but I guess this makes sense, on LNT we run the benchmarks with -j1 so we wouldn't get the race conditions
Do you know what benchmarks/tests we have that share an executable within the test-suite?
it seems all the errors are for a dummy executable example Fortran/gfortran/regression/dummy.stripped
there are about 421 such errors
I haven't seen this before on our LNT configuration but I guess this makes sense, on LNT we run the benchmarks with -j1 so we wouldn't get the race conditions Do you know what benchmarks/tests we have that share an executable within the test-suite?
it seems all the errors are for a dummy executable example
Fortran/gfortran/regression/dummy.strippedthere are about 421 such errors
Maybe a more reliable way to fix this is to avoid the dummy executable altogether? it seems like it's only created to avoid some sort of limitation of llvm_test_run, see gfortran_add_compile_test
I haven't seen this before on our LNT configuration but I guess this makes sense, on LNT we run the benchmarks with -j1 so we wouldn't get the race conditions Do you know what benchmarks/tests we have that share an executable within the test-suite?
it seems all the errors are for a dummy executable example
Fortran/gfortran/regression/dummy.strippedthere are about 421 such errorsMaybe a more reliable way to fix this is to avoid the dummy executable altogether? it seems like it's only created to avoid some sort of limitation of
llvm_test_run, seegfortran_add_compile_test
I can try to remove the limitation on llvm_test_run. However, from a cursory analysis. it means we will have to do some fundamental changes like removing "missing executables check" from litsupport/test.py and "RUN: line check" from litsupport/testfile.py. Would that be ok?