Skip to content

Commit 8a4616e

Browse files
HumanBean17claude
andcommitted
fix(ci): isolate test files into separate processes to stop kuzu SIGSEGV
Running the full suite in one process accumulated native runtimes (cocoindex + lancedb Tokio, kuzu scheduler, torch) that corrupted the heap, crashing kuzu's NodeTableScanState::scanNext with a SIGSEGV at ~53%. pytest-xdist --dist loadfile gives each test file a fresh worker process so no cross-file native state accumulates. Verified on real x86 CI: 771 passed / 9 skipped, no segfault. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 229c544 commit 8a4616e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ jobs:
6767
HF_TOKEN: ${{ secrets.HF_TOKEN }}
6868
TRANSFORMERS_CACHE: ~/.cache/huggingface
6969
HF_HOME: ~/.cache/huggingface
70-
run: pytest tests -v
70+
# Process isolation: run each test file in its own fresh worker process.
71+
# Running the full suite in a single process accumulates native runtimes
72+
# (cocoindex + lancedb Tokio, plus kuzu's scheduler and torch) that corrupt
73+
# the heap, crashing kuzu's NodeTableScanState::scanNext with a SIGSEGV ~53%.
74+
# `--dist loadfile` keeps each file in one worker, so no cross-file state
75+
# accumulates. Verified: 771 passed / 9 skipped, no segfault.
76+
run: pytest tests -n auto --dist loadfile -v
7177
- name: Skip tests (docs-only)
7278
if: steps.changes.outputs.code != 'true'
7379
run: echo "Docs-only change; pytest skipped."

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies = [
4343
dev = [
4444
"pytest>=7",
4545
"pytest-asyncio>=0.21",
46+
"pytest-xdist>=3",
4647
"ruff>=0.4",
4748
]
4849

0 commit comments

Comments
 (0)