Free-threaded crash on musllinux
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
Running a codemod across many files with the free-threading build runs into a SIGSEGV while parsing.
Repro from within a libcst checkout
```
docker run -v .:/project --rm -ti quay.io/pypa/musllinux_1_2_x86_64 uv run --no-project -p /opt/python/cp313-cp313t/bin/python --with libcst==1.8.3.dev1 --extra-index-url=https://test.p
ypi.org/simple/ python -m libcst.tool codemod remove_unused_imports.RemoveUnusedImportsCommand /project/libcst/_nodes/
```
Crash should happen within a few seconds. Seems like this only happens on musllinux for some reason.
To get a stacktrace:
```
docker run -v .:/project -ti quay.io/pypa/musllinux_1_2_x86_64 bash
```
then from within the container:
```
apk add gdb cargo lldb
cd /project
uv sync -p /opt/python/cp313-cp313t/bin/python
source .venv/bin/activate
uv pip install -e .
gdb --args python -m libcst.tool codemod remove_unused_imports.RemoveUnusedImportsCommand /project/libcst/_nodes/
```
Then you can type `run` from gdb to get it to crash, and inspect the [stack trace](https://gist.github.com/zsol/a786ab6bfaa25883ab4f804b1334c226) with `bt`
I found this while working on https://github.com/Instagram/LibCST/pull/1359 to run a smoke test on the wheels built by CI.
Contributor guide
Assessment
This issue has not been assessed yet.