Closed Bug 485390 Opened 12 years ago Closed 12 years ago
Race creating JAR files in Jar
Maker .py with highly-parallel builds
utils.lockFile doesn't always lock the file: O_EXCL seems to only take effect as long as you're holding the file descriptor open. This puts a lie to the expected meaning of O_EXCL, but I don't care. It works. I think this should block 1.9.1 because with highly parallel builds it's not hard to end up with JAR files which are incomplete because multiple JarMakers are trying to write at the same time.
Comment on attachment 369540 [details] [diff] [review] Keep the fd open, rev. 1 Good catch!
Attachment #369540 - Flags: review?(ted.mielczarek) → review+
I pushed this yesterday but it didn't actually fix the problem, so I'm backing it out. I found the race elsewhere (in the JarMaker logic which tests whether the .jar file exists)
Attachment #370193 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 370193 [details] [diff] [review] Fix race in JarMaker.py creating a .jar file that doesn't exist yet, rev. 1 I shudder in fear at all the other race conditions waiting in our build system.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Priority: -- → P2
Summary: utils.lockFile doesn't → Race creating JAR files in JarMaker.py with highly-parallel builds
This is the shell script I used for race-testing, saved for posterity
You need to log in before you can comment on or make changes to this bug.