https://pantsbuild.org/ logo
#general
Title
# general
h

high-magician-46188

04/27/2023, 1:00 PM
Hi, I'm trying out the Pants launcher in CI, after a long time of successful local usage. However, I'm getting an error which I think is related to my setup, but I'm not sure about why it happens on how to avoid it. Will appreciate any help. Details in ๐Ÿงต.
Output:
Copy code
[2023-04-27T12:48:54.122Z] ci/run_pants.sh --version
[2023-04-27T12:48:57.328Z] 12:48:57.29 [INFO] Initializing scheduler...
[2023-04-27T12:48:57.829Z] 12:48:57.82 [INFO] Scheduler initialized.
[2023-04-27T12:48:57.929Z] 12:48:57.88 [WARN] Please run with `--plugins=hdrhistogram` if you would like histogram summaries to be shown at the end of the run, or permanently add `[GLOBAL].plugins = ['hdrhistogram']`. This will cause Pants to install the `hdrhistogram` dependency from PyPI.
[2023-04-27T12:48:57.929Z] 2.16.0.dev3
[2023-04-27T12:48:57.929Z] 12:48:57.91 [INFO] Counters:
[2023-04-27T12:48:57.929Z]   backtrack_attempts: 0
[2023-04-27T12:48:57.929Z]   docker_execution_errors: 0
[2023-04-27T12:48:57.929Z]   docker_execution_requests: 0
...
[2023-04-27T12:48:57.930Z]   remote_execution_success: 0
[2023-04-27T12:48:57.930Z]   remote_execution_timeouts: 0
[2023-04-27T12:48:57.930Z]   remote_process_total_time_run_ms: 0
[2023-04-27T12:48:57.930Z]   remote_store_missing_digest: 0
[2023-04-27T12:48:58.030Z] Fatal Python error: PyGILState_Release: thread state 0x7fef0c0011b0 must be current when releasing
[2023-04-27T12:48:58.030Z] Python runtime state: finalizing (tstate=0xad0050)
[2023-04-27T12:48:58.030Z] 
[2023-04-27T12:48:58.030Z] Thread 0x00007fef7efd8000 (most recent call first):
[2023-04-27T12:48:58.030Z] <no Python frame>
[2023-04-27T12:48:58.331Z] ci/run_pants.sh: line 17: 56893 Aborted                 (core dumped) pants "$@"
script returned exit code 134
`ci/run_pants.sh`:
Copy code
#!/bin/bash

set -e

export PYTHON_CFLAGS="${PYTHON_CFLAGS:--O3}"
export PANTSBUILD_INSTALLATION_DIR="${PANTSBUILD_INSTALLATION_DIR:-/opt/pantsbuild}"
export PYENV_ROOT="${PYENV_ROOT:-/.pyenv}"

# The Pants installer installs into the home directory
export HOME=$PANTSBUILD_INSTALLATION_DIR

PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH:$PANTSBUILD_INSTALLATION_DIR/bin

pants "$@"
e

enough-analyst-54434

04/27/2023, 2:45 PM
Likely fixed here: https://github.com/pantsbuild/pants/pull/18166 and that's in 2.16.0.dev7. As a rule of thumb, if not on a stable release, try the latest 1st: https://pypi.org/project/pantsbuild.pants/2.16.0rc1/
h

high-magician-46188

04/27/2023, 4:08 PM
Actually, we are using dev3 for months now both locally and in CI and it was all fine. The thing I changed is in CI, installing it using the launcher. I'm insisting here for a bit since I need it to work with dev3 and the launcher in order to migrate CI to the launcher without breaking a heap of PRs. If there any hack I can implement on my side to mitigate that issue?
e

enough-analyst-54434

04/27/2023, 4:10 PM
Nope. Not if I'm right about the root cause.
What do you mean by "the launcher" by the way?
You mean scie-pants - the
./pants
replacement?
If so, it is totally unrelated to the Pants bug but does trigger it more often.
So your only option I think is to treat the 2 goals as orthogonal. 1st upgrade to >= .dev7 , then, once done, switch to the launcher.
h

high-magician-46188

04/29/2023, 6:46 AM
I see.. Thanks - will do so ๐Ÿ™‚
2 Views