pants: Generating lockfiles fails with: unknown error (_ssl.c:3161)
Describe the bug
When trying to generate lockfiles command fails with the following error: Failed to spawn a job for /home/manos/Workspace/pants-repo/.conda/bin/python3.9: unknown error (_ssl.c:3161)
pants --print-stacktrace -ldebug generate-lockfiles ::
18:15:17.57 [INFO] Initialization options changed: reinitializing scheduler...
18:15:22.39 [INFO] Scheduler initialized.
18:15:23.84 [INFO] Completed: Generate lockfile for python-default
18:15:23.84 [ERROR] 1 Exception encountered:
Engine traceback:
in select
..
in pants.core.goals.generate_lockfiles.generate_lockfiles_goal
`generate-lockfiles` goal
Traceback (most recent call last):
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/core/goals/generate_lockfiles.py", line 557, in generate_lockfiles_goal
results = await MultiGet(
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 361, in MultiGet
return await _MultiGet(tuple(__arg0))
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 168, in __await__
result = yield self.gets
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 626, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/backend/python/goals/lockfile.py", line 110, in generate_lockfile
result = await Get(
File "/home/manos/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
result = yield self
pants.engine.process.ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:
stderr:
Failed to spawn a job for /home/manos/Workspace/pants-repo/.conda/bin/python3.9: unknown error (_ssl.c:3161)
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
Pants version Tested with versions:
- 2.16.0
- 2.17.0
- 2.18.0
- 2.18.2
- 2.19.0rc5
(same result for all tested versions)
OS Tested with
- Fedora 38 (Linux 6.6.13-100.fc38.x86_64)
- Fedora 39 (Linux 6.6.13-200.fc39.x86_64)
(same result for all tested versions)
Additional info I think this issue started happening after a kernel update from Fedora. Has anyone else run into this issue before? Any suggestions on how to resolve this would be very appreciated!
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 19 (17 by maintainers)
Commits related to this issue
- upgrade Pex to 2.1.163 Changelogs: * https://github.com/pantsbuild/pex/releases/tag/v2.1.163 ``` Lockfile diff: 3rdparty/python/user_reqs.lock [python-default] == Upgraded depen... — committed to cburroughs/pants by cburroughs 5 months ago
- upgrade Pex to 2.1.163 (#20502) Changelogs: * https://github.com/pantsbuild/pex/releases/tag/v2.1.163 ``` Lockfile diff: 3rdparty/python/user_reqs.lock [python-default] == ... — committed to pantsbuild/pants by cburroughs 5 months ago
- Add a warning about PBS & OpenSSL. Point readers to the result of the investigation in https://github.com/pantsbuild/pants/issues/20467 and https://github.com/pex-tool/pex/issues/2355 to https://gith... — committed to jsirois/lift by jsirois 5 months ago
- Add a warning about PBS & OpenSSL. (#56) Point readers to the result of the investigation in https://github.com/pantsbuild/pants/issues/20467 and https://github.com/pex-tool/pex/issues/2355 to https:... — committed to a-scie/lift by jsirois 5 months ago
To use the new version of Pex without waiting on a Pants release
(That’s the sha256 and size of the
pex
artifact, which you can calculate your self by downloading from the release page.)The explanation is contained in a comment in https://github.com/pantsbuild/pex/pull/2358 which I’ve pinged folks in this thread on.
I’ve flipped this back to a bug - apologies @mjimlittle, you ended up being right there. With @xlevus’s help debugging, a fix for this issue in Pex is now released in 2.1.163: https://github.com/pantsbuild/pex/releases/tag/v2.1.163
A Pants maintainer will take it from here and upgrade Pants / instruct you how to do so for your Pants version.
@xlevus I’m working on a short-term fix in https://github.com/pantsbuild/pex/issues/2355. I’d still love to know what’s really going on here, but 1st to stop the bleeding.