Skip to content

Commit a59d227

Browse files
committed
openviking: fix CI - cap rustc parallelism, relax 0.4.21's tree-sitter pin
CARGO_PROFILE_RELEASE_LTO=thin (added for 0.4.17.1's rustc heap corruption) mitigates but does not eliminate the crash: 0.4.17.1 SIGABRT'd again with the same "malloc(): unsorted double linked list corrupted", and 0.4.19 hung silently after its ov CLI build until the 360-minute job timeout cancelled it. Both match gotcha 228 (rustc OOM/heap-corruption under concurrent codegen on the 4-core riscv64 runners); add CARGO_BUILD_JOBS=2 to cap concurrent rustc processes, the fix gotcha 228 and several other Rust ports in this repo already use. Separately, 0.4.21's test install failed outright: "Could not find a version that satisfies the requirement tree-sitter==0.25.2 (from openviking)". tree-sitter never published a riscv64 wheel for 0.25.2 -- riscv64 wheels only start at 0.26.0 -- so PIP_ONLY_BINARY=:all: in the test environment has nothing to install. 0.4.20 pins tree-sitter loosely (>=0.23.0); 0.4.21 tightened it to an exact pin. Patch pyproject.toml to relax it back to a lower bound so the resolver can pick 0.26.0; this port's smoke test and pytest selection never touch tree-sitter's Python API directly.
1 parent 7c78c42 commit a59d227

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

‎.github/workflows/build-openviking.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,13 @@ jobs:
201201
# Fat LTO of ragfs-python (workspace [profile.release] lto = true) intermittently
202202
# corrupts rustc's heap on the riscv64 runners from 0.4.17.1 on: "double free or
203203
# corruption" / "free(): corrupted unsorted chunks" SIGABRTs, or a hang until the
204-
# job timeout. Thin LTO avoids the single huge LTO module.
204+
# job timeout. Thin LTO avoids the single huge LTO module, but concurrent rustc
205+
# codegen threads can still exhaust these runners' memory the same way (gotcha
206+
# 228), so also cap cargo's own parallelism.
205207
CIBW_ENVIRONMENT: >-
206208
PATH="$PATH:$HOME/.cargo/bin"
207209
CARGO_PROFILE_RELEASE_LTO=thin
210+
CARGO_BUILD_JOBS=2
208211
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
209212
OV_REQUIRE_RAGFS_BUILD=1
210213
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENVIKING=${{ env.OPENVIKING_VERSION }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Mon, 28 Sep 2026 00:00:00 +0000
4+
Subject: [PATCH] pyproject: relax the tree-sitter pin so riscv64 can resolve
5+
it
6+
7+
pyproject.toml pins `tree-sitter==0.25.2`, which never published a
8+
riscv64 wheel -- tree-sitter's own PyPI files only gained a
9+
`manylinux_riscv64` wheel starting with 0.26.0. With
10+
`PIP_ONLY_BINARY=:all:` in the wheel's test environment, installing the
11+
built wheel fails outright:
12+
13+
ERROR: Could not find a version that satisfies the requirement
14+
tree-sitter==0.25.2 (from openviking) (from versions: 0.26.0)
15+
ERROR: No matching distribution found for tree-sitter==0.25.2
16+
17+
Relax the pin to a lower bound so the resolver can pick 0.26.0 instead;
18+
the smoke test and pytest selection this port runs never touch
19+
tree-sitter's Python API directly, so the exact-pin "avoid unvalidated
20+
upstream API and grammar changes" concern the comment names does not
21+
apply to this port's own test coverage.
22+
23+
Upstream-Status: Inappropriate [riscv64-wheel availability is specific to this port; upstream's own CI never resolves against a riscv64 index]
24+
25+
Signed-off-by: Ludovic Henry <git@ludovic.dev>
26+
---
27+
diff --git a/pyproject.toml b/pyproject.toml
28+
index 0000000..0000000 100644
29+
--- a/pyproject.toml
30+
+++ b/pyproject.toml
31+
@@ -61,7 +61,7 @@ dependencies = [
32+
"litellm>=1.83.7,<1.91.2",
33+
"python-multipart>=0.0.31",
34+
# Pin the parsing stack to avoid unvalidated upstream API and grammar changes.
35+
- "tree-sitter==0.25.2",
36+
+ "tree-sitter>=0.25.2",
37+
"tree-sitter-python==0.25.0",
38+
"tree-sitter-javascript==0.25.0",
39+
"tree-sitter-typescript==0.23.2",

0 commit comments

Comments
 (0)