-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Labels
bugSomething isn't workingSomething isn't workingparsingConverting source code into CST nodesConverting source code into CST nodes
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 with bt
I found this while working on #1359 to run a smoke test on the wheels built by CI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingparsingConverting source code into CST nodesConverting source code into CST nodes