debug: full suite under gdb with OMP_NUM_THREADS=1 RAYON_NUM_THREADS=1 #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: debug-segfault | |
| # TEMPORARY: capture the C-level backtrace of the kuzu SIGSEGV that test.yml | |
| # hits at ~53% (tests/test_ladybug_queries.py::test_find_by_name_or_fqn_simple_name | |
| # -> ladybug.connection._execute_with_pybind). The crash only reproduces on real | |
| # x86_64 (not on macOS Docker), so we run under gdb here. Delete this file once | |
| # the root cause is found. | |
| on: | |
| push: | |
| branches: [debug/segfault-gdb] | |
| jobs: | |
| gdb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install gdb | |
| run: sudo apt-get update && sudo apt-get install -y gdb | |
| - name: Cache HuggingFace models | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/huggingface | |
| key: hf-${{ hashFiles('**/pyproject.toml') }}-v1 | |
| restore-keys: | | |
| hf-${{ hashFiles('**/pyproject.toml') }}- | |
| hf- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run FULL suite under gdb with native thread limits (OMP=1, RAYON=1) | |
| continue-on-error: true | |
| env: | |
| JAVA_CODEBASE_RAG_RUN_HEAVY: "0" | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| TRANSFORMERS_CACHE: ~/.cache/huggingface | |
| HF_HOME: ~/.cache/huggingface | |
| PYTHONFAULTHANDLER: "1" | |
| OMP_NUM_THREADS: "1" | |
| RAYON_NUM_THREADS: "1" | |
| run: | | |
| gdb -q -batch \ | |
| -ex "set pagination off" \ | |
| -ex "set print thread-events off" \ | |
| -ex "run" \ | |
| -ex "echo \n========== GDB: ALL THREADS BACKTRACE ==========\n" \ | |
| -ex "thread apply all bt" \ | |
| --args python -m pytest tests -v 2>&1 | tee gdb-output.log | |
| echo "gdb finished (inferior exit ${PIPESTATUS[0]}; 139 = SIGSEGV expected)" | |
| - name: Show crash location | |
| if: always() | |
| run: | | |
| echo "=== signal / fault markers ===" | |
| grep -nE "Fatal Python error|Segmentation fault|received signal SIGSEGV|Program terminated" gdb-output.log | head || true | |
| echo "=== gdb backtrace (first 150 lines after marker) ===" | |
| awk '/GDB: ALL THREADS BACKTRACE/{f=1} f{print; if(++n>150) exit}' gdb-output.log || true | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: gdb-output | |
| path: gdb-output.log |