pex
pex copied to clipboard
Pex POSIX locking appears to be broken.
I added a knob to force bsd style locks using _PEX_LOCK_FILE_STYLE=bsd
in #1962 and this looks like it solved #1969. The failure mechanism of POSIX locks needs to be understood and either bsd locks switched to wholesale or else POSIX locks fixed. The _PEX_LOCK_FILE_STYLE
env var should then be deprecated to emit warning messages on use and then removed in 3.0.0.
I was able to come up with a test case for this: https://github.com/pantsbuild/pex/issues/1969#issuecomment-1411673001
It turned out there was never a problem with POSIX locks, there was an enormous 9 month goose chase that ended up being caused by Pants not synchronously waiting for spawned subprocesses. See:
- https://github.com/pantsbuild/pants/issues/16778#issuecomment-1491120170
- https://github.com/pantsbuild/pants/pull/18632