<#6535 executing multiple pexes with the same file...
# github-notifications
c
#6535 executing multiple pexes with the same file on their PEX_PATH concurrently can result in OSError Issue created by cosmicexplorer currently working on an upstream repro The internal repro of this looks like:
Copy code
./pants binary path/to:pex-1
./pants binary path/to:pex-2

chmod +x ./dist/pex-2.pex
export PEX_PATH=`pwd`/dist/pex-1.pex
echo $PEX_PATH

./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
./dist/pex-2.pex &
Which results in:
Copy code
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 364, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 147, in activate
File ".bootstrap/_pex/environment.py", line 198, in _activate
File ".bootstrap/_pex/environment.py", line 52, in force_local
OSError: [Errno 39] Directory not empty
<one line of output, which means at least one binary ran to completion>
Setting
PANTS_ENABLE_PANTSD=False
stopped this. I suspect this is something that is being done wrong in pants that propagates to the pex files here -- looking up how
PEX_PATH
is consumed is likely to be enlightening. pantsbuild/pants