|
| 1 | +name: debug-segfault |
| 2 | + |
| 3 | +# TEMPORARY: capture the C-level backtrace of the kuzu SIGSEGV that test.yml |
| 4 | +# hits at ~53% (tests/test_ladybug_queries.py::test_find_by_name_or_fqn_simple_name |
| 5 | +# -> ladybug.connection._execute_with_pybind). The crash only reproduces on real |
| 6 | +# x86_64 (not on macOS Docker), so we run under gdb here. Delete this file once |
| 7 | +# the root cause is found. |
| 8 | +on: |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +jobs: |
| 12 | + gdb: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + fetch-depth: 0 |
| 18 | + - uses: actions/setup-python@v5 |
| 19 | + with: |
| 20 | + python-version: "3.11" |
| 21 | + - name: Install gdb |
| 22 | + run: sudo apt-get update && sudo apt-get install -y gdb |
| 23 | + - name: Cache HuggingFace models |
| 24 | + uses: actions/cache@v4 |
| 25 | + with: |
| 26 | + path: ~/.cache/huggingface |
| 27 | + key: hf-${{ hashFiles('**/pyproject.toml') }}-v1 |
| 28 | + restore-keys: | |
| 29 | + hf-${{ hashFiles('**/pyproject.toml') }}- |
| 30 | + hf- |
| 31 | + - name: Install dependencies |
| 32 | + run: | |
| 33 | + python -m pip install --upgrade pip |
| 34 | + pip install -e ".[dev]" |
| 35 | + - name: Run suite under gdb (capture kuzu SIGSEGV backtrace) |
| 36 | + continue-on-error: true |
| 37 | + env: |
| 38 | + JAVA_CODEBASE_RAG_RUN_HEAVY: "0" |
| 39 | + HF_TOKEN: ${{ secrets.HF_TOKEN }} |
| 40 | + TRANSFORMERS_CACHE: ~/.cache/huggingface |
| 41 | + HF_HOME: ~/.cache/huggingface |
| 42 | + PYTHONFAULTHANDLER: "1" |
| 43 | + run: | |
| 44 | + gdb -q -batch \ |
| 45 | + -ex "set pagination off" \ |
| 46 | + -ex "set print thread-events off" \ |
| 47 | + -ex "run" \ |
| 48 | + -ex "echo \n========== GDB: ALL THREADS BACKTRACE ==========\n" \ |
| 49 | + -ex "thread apply all bt" \ |
| 50 | + --args python -m pytest tests -v 2>&1 | tee gdb-output.log |
| 51 | + echo "gdb finished (inferior exit ${PIPESTATUS[0]}; 139 = SIGSEGV expected)" |
| 52 | + - name: Show crash location |
| 53 | + if: always() |
| 54 | + run: | |
| 55 | + echo "=== signal / fault markers ===" |
| 56 | + grep -nE "Fatal Python error|Segmentation fault|received signal SIGSEGV|Program terminated" gdb-output.log | head || true |
| 57 | + echo "=== gdb backtrace (first 150 lines after marker) ===" |
| 58 | + awk '/GDB: ALL THREADS BACKTRACE/{f=1} f{print; if(++n>150) exit}' gdb-output.log || true |
| 59 | + - uses: actions/upload-artifact@v4 |
| 60 | + if: always() |
| 61 | + with: |
| 62 | + name: gdb-output |
| 63 | + path: gdb-output.log |
0 commit comments