-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Failure to extract dependencies to ~/.pex/install if they already exist with some Python version #265
Comments
tl;dr if you're catching the exception, use the broader Python invokes system calls, in the case of
Anyway, you'll want a more robust approach that is kernel and filesystem agnostic. |
@jcohen it'd be great to get your repro details for this. afaict, this is actually a race condition vs a simple "run pex twice on centos7" bug:
there is logic in: https://github.com/pantsbuild/pex/blob/ba58a854d561dcf6963c0097cad544bfe2861c5a/pex/util.py#L167 which checks for existence of hence, would be great to confirm this theory with a repro. |
This pulls in a quick fix for pex-tool/pex#265 to relieve an apparent race condition internal teams at Twitter are hitting with pex execution on centos7/xfs. Testing Done: https://travis-ci.org/pantsbuild/pants/builds/133540161 Bugs closed: 3518 Reviewed at https://rbcommons.com/s/twitter/r/3949/
Specifically on a host running Python 2.7.5 we ran into the following stack trace:
In this case we're on a slightly older version of pex, line 177 in util.py is: https://github.com/pantsbuild/pex/blob/ba58a854d561dcf6963c0097cad544bfe2861c5a/pex/util.py#L177
So, the rename fails because the directory exists. In this case it's raising EEXIST, whereas pex only expects ENOTEMPTY to be a continuable error code.
Pex should handle EEXIST with the same behavior as ENOTEMPTY in this case.
The text was updated successfully, but these errors were encountered: