ocra
ocra copied to clipboard
Race condition when running the same self-extracting exe concurrently
We have a build job that runs several concurrent instances of a self-extracting Ruby script that fails intermittently. The error looks something like this (simplified):
[6/35] Generating workflows/UploadLogoWorkflow_diagram.plantuml
FAILED: Documentation/workflows/UploadLogoWorkflow_diagram.plantuml
cmd.exe /C "cd /D C:\foo && workflow-to-dot.exe UploadLogoWorkflow.qml"
FATAL ERROR: Failed to create installation directory.
[7/35] Generating workflows/ImportWorkflow_diagram.plantuml
FAILED: Documentation/workflows/ImportWorkflow_diagram.plantuml
cmd.exe /C "cd /D C:\foo && workflow-to-dot.exe ImportWorkflow.qml"
ruby.exe: No such file or directory -- C:/Users/GENSHI~1/AppData/Local/Temp/ocrC22B.tmp/src/apps/qml-workflow/workflow-to-dot.rb (LoadError)
Note that Ninja is driving this build so while the job output is serialized, the job execution is not necessarily serialized. So jobs 6 and 7 in the above example are likely running currently.
Is it valid to use ocra self-extracting Ruby scripts concurrently? Is that use case tested?
Sorry I don't have a good minimal test case for you.