Skip to content

fix(ci): pin tree-sitter<0.26 to stop native segfault (#235) - #266

Merged
Wolfvin merged 1 commit into
mainfrom
fix/issue-235-treesitter-026-segfault
Jul 13, 2026
Merged

fix(ci): pin tree-sitter<0.26 to stop native segfault (#235)#266
Wolfvin merged 1 commit into
mainfrom
fix/issue-235-treesitter-026-segfault

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Mengapa

PR #262 memperbaiki YAML CI (init→scan, check→audit, benchmark) tapi bagian segfault salah diagnosa. CI log (run 29244152939) menunjukkan crash BUKAN stack overflow — ulimit -s unlimited tidak berpengaruh:

Fatal Python error: Segmentation fault
Current thread ... File "scripts/parsers/python_parser.py", line 126 in extract_references
  File "tests/test_large_file_parsing.py", line 119 in test_file_above_old_threshold_is_parsed
Extension modules: ... tree_sitter_python._binding
Segmentation fault (core dumped) python -m pytest ...

Crash native di tree_sitter_python._binding, dipicu file shallow 250-baris (bukan yang deeply-nested).

Root cause

  • CI (segfault): tree-sitter core 0.26.0 (unpinned via tree-sitter>=0.21.0)
  • Lokal (lolos): tree-sitter core 0.25.2

python_parser.py sendiri sudah punya komentar bahwa "tree-sitter 0.26's binding does not make Node objects hold a strong reference to the Tree" — mitigasi keep_alive-nya tidak cukup untuk 0.26 → native use-after-free.

Perbaikan

Pin tree-sitter>=0.21.0,<0.26 (versi 0.25.x known-safe) di:

  • pyproject.toml (source of truth)
  • codelens-ci.yml (3 job), codelens-benchmark.yml, codelens-sarif.yml

Revert ulimit yang menyesatkan (hipotesis salah).

Follow-up

Issue baru akan dibuat: buat python_parser.py keep_alive strategy 0.26-safe supaya cap bisa dilepas. Itu deep parser work → worker.

Closes #235

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wolfvin
Wolfvin merged commit d120ff6 into main Jul 13, 2026
0 of 6 checks passed
@Wolfvin
Wolfvin deleted the fix/issue-235-treesitter-026-segfault branch July 13, 2026 12:20
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): CodeLens CI/Quality Gate broken on main since #195 consolidation

1 participant