-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python task execution can bomb with an unhandled OSError
when interpreter cache goes stale.
#3416
Comments
part 1 is reviewable here (pex uses the PR workflow): pex-tool/pex#255 |
#255 has landed in pex master. |
Pants caches the python interpreter by symlinking the interpreter from a known (trusted) location in the local file system. This is an issue if the local python interpreter is also a symlink to another location. Pants doesn't know about the change and has no runtime check to validate and fix the interpreter cache. This tricks pants into thinking there doesn't exist an available python interpreter even when it is simply untrue. The end result is an unstable / non-working pants. The solution is to hand-massage the situation by either a ./pants clean-all or a manual cleanup of the pants python interpreter cache directory. |
Closed by #7225. |
observed by one of our users while attempting a
./pants binary <target>
:which ended up being the attempted execution of a dangling symlink to the python interpreter as stored in pants' interpreter cache - along the lines of:
the workaround was a
./pants clean-all
which removes the interpreter cache and allows for a clean rebuild without the dangling symlinks.I'm thinking this needs two bits of love:
this particular
subprocess.Popen
call in pex'scompiler.py
and potentially wherever else this pattern is repeated should trapOSError
and surface a more meaningful exception with the execution failure context.we should do a better job of validating and pruning the interpreter cache run over run to avoid staleness that can cause this in the first place.
The text was updated successfully, but these errors were encountered: