Skip to content

Free-threaded crash on musllinux #1362

@zsol

Description

@zsol

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 with bt

I found this while working on #1359 to run a smoke test on the wheels built by CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsingConverting source code into CST nodes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions