Hi! I'm building a project with pants and running ...
# general
b
Hi! I'm building a project with pants and running into the following error any idea why it might be seg faulting?
Copy code
/Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/bin/python -sE /Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q --cache-dir /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache download --dest /Users/viveksivakumar/.cache/pants/named_caches/pex_root/downloads/resolver_download.pif1cshf/Users.viveksivakumar..pyenv.versions.3.11.0.bin.python3.11 pip==23.1.2 setuptools==67.7.2 wheel==0.40.0 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with -11 and STDERR:
h
Hi! More detail is usually helpful: platform (looks like macos?). architecture, pants version, pants command. That said, this is likely a segfault inside pip (which is executed by pex). So the best thing is to try and reproduce outside of Pants. E.g., you can run with
--keep-sandboxes=on_failure
, find the relevant sandbox (which will be for a pex invocation) and see if this error reproduces when you
./__run.sh
inside that sandbox. If so, you now have a repro involving just pex. Then you can inspect that run’s logs to get the underlying pip command and see if you can isolate to just pip. And the pip logs will be instructive to see where it segfaulted.
b
macos m1, pants version is 2.19.1
have a few commands giving me this issue here's the most recent one i ran that just runs unit tests in the project
pants test projects/common/spark_join/tests/::
i have managed to get the
__run.sh_
and that does give me the same error, i dont know if the log is giving me more info let me run it again now
this is the output when i run the run.sh commands
exited with -11 and STDERR: None
Okay managed to get the following log from pex
Copy code
pex: Resolving interpreters: 381.8ms
pex:   Hashing pex: 148.3ms
pex:   Isolating pex: 0.0ms
pex: Parsing lock pytest.lock: 7.3ms
pex: Building pex :: Resolving distributions () :: Resolving requirements from lock file pytest.lock :: Resolving for: to fetch for 3 requirements from lock pytest.lock
pex: Spawning a maximum of 5 parallel jobs to process:hon3.11
  /Users/viveksivakumar/.pyenv/versions/3.11.0/bin/python3.11
pex: Executing: CPPFLAGS='' HOME=/Users/viveksivakumar JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home LANG=en_US.UTF-8 LDFLAGS='' PATH=/Users/viveksivakumar/.pyenv/shims:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/viveksivakumar/.okta/bin __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 PEX=/private/var/folders/mn/r2c788s164x5vksk96nrxz0h0000gn/T/pants-sandbox-YlgWCT/pex TMPDIR=/Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp PEX_ROOT=/Users/viveksivakumar/.cache/pants/named_caches/pex_root PEX_VERBOSE=9 __PEX_UNVENDORED__=1 /Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/bin/python -sE /Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -vvv --cache-dir /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache download --dest /Users/viveksivakumar/.cache/pants/named_caches/pex_root/downloads/resolver_download.a5lxuy8h/Users.viveksivakumar..pyenv.versions.3.11.0.bin.python3.11 pip==23.0.1 setuptools==67.4.0 wheel==0.38.4 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15
Created temporary directory: /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp/pip-req-tracker-zi0w9ifs
Initialized build tracking at /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp/pip-req-tracker-zi0w9ifs
Created build tracker: /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp/pip-req-tracker-zi0w9ifs
Entered build tracker: /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp/pip-req-tracker-zi0w9ifs
Created temporary directory: /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache/.tmp/pip-download-u604gd22
Looking in indexes: <https://pypi.org/simple/>
1 location(s) to search for versions of pip:
* <https://pypi.org/simple/pip/>
Fetching project page and analyzing links: <https://pypi.org/simple/pip/>
Getting page <https://pypi.org/simple/pip/>
Found index url <https://pypi.org/simple/>
Looking up "<https://pypi.org/simple/pip/>" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): <http://pypi.org:443|pypi.org:443>
pid 55254 -> /Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/bin/python -sE /Users/viveksivakumar/.cache/pants/named_caches/pex_root/venvs/ed91772ee6eac99a45d5b18ffca7698191302da4/f75ce892d8c5cfe69ef083b4b837089b48e86545/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -vvv --cache-dir /Users/viveksivakumar/.cache/pants/named_caches/pex_root/pip/20.3.4-patched/pip_cache download --dest /Users/viveksivakumar/.cache/pants/named_caches/pex_root/downloads/resolver_download.a5lxuy8h/Users.viveksivakumar..pyenv.versions.3.11.0.bin.python3.11 pip==23.0.1 setuptools==67.4.0 wheel==0.38.4 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with -11 and STDERR:
None
if anyone happens to run into something similar this ended up being the issue: https://github.com/pyenv/pyenv/issues/1048
h
So a homebrew upgrade issue?
Good to know!