feat(t27b): JIT on arm64 Linux, corpus --json/--runner, Railway lab - #6098
Conversation
The t27b JIT now also runs on arm64 Linux: mmap RW, copy, clean the data cache and invalidate the instruction cache to the point of unification (dc cvau / ic ivau, CTR_EL0 line sizes, dsb ish; isb), then mprotect RX. The macOS MAP_JIT path is the same sequence as before, moved into map_code. t27b corpus gains --json <path> (per-file records plus the totals the text summary prints) and --runner "<cmd> [args]" (start each per-file t27b test through a wrapper, for qemu-user without binfmt_misc). contrib/railway/t27b-lab holds a Dockerfile and lab.py that build t27c natively, cross-build t27b for aarch64-unknown-linux-gnu, run the corpus under qemu-user and the reference path natively, and serve the results over HTTP. No secrets; it never writes to GitHub. Closes #6071 Refs #6063 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first run on Railway failed the reference step with "can't start new thread": the container reports 48 CPUs but has a 24-CPU quota and pids.max = 1000, and each zig test spawns about one thread per visible CPU. Workers now come from cpu.max and pids.max (overridable with T27_JOBS and T27_REFERENCE_JOBS), both limits are recorded in the toolchain block, and a fork failure is counted as reference lab_error, never as pass or fail. Refs #6071 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #6071 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e into corpus --json) Resolves the cli/t27b conflicts with #6064 (corpus --blockers, --reference, --reference-cache) keeping both feature sets. `corpus --json` now carries the reference path's verdicts when `--reference` is given: per file `reference` (pass / blocked / fail / timeout) plus `reference_detail`, and `totals.reference` = {ran, pass, blocked, fail, timeout, skip}. lab.py reads `reference_detail` when it takes the verdicts from the corpus JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged master (a9650c0, #6064) in as 5b287fa, which is a merge commit with no rebase. I resolved the conflicts in cli/t27b/src/main.rs and README.md so both sets of options stay: --json/--runner and --blockers/--reference/--reference-cache. The reference result now goes into corpus --json. With --reference, each record has reference (pass/blocked/fail/timeout) plus reference_detail, and totals.reference = {ran, pass, blocked, fail, timeout, skip}. lab.py now reads reference_detail. I tested it on a one-file corpus with t27c, and cargo check plus cargo test -p t27b pass. Still to do: the lab does not pass --reference to its qemu corpus run yet, so it still runs its own native reference step. If it did, t27c and zig would be started from inside qemu-user, and nobody has tested that yet. |
PR DashboardGenerated at: 2026-10-04 15:57:01 UTC
Summary
Seal Status
|
Closes #6071
Refs #6063
The owner's Mac runs at load 600-850, so t27b corpus runs move to a Railway service. The JIT is exercised on aarch64 Linux under qemu-user.
What changes
cli/t27b/src/jit.rs: the JIT works on arm64 Linux. The region is mapped RW, written, flushed (dc cvau/ic ivauusing CTR_EL0 line sizes,dsb ish; isb), then switched to RX withmprotect. The macOS path (MAP_JIT,pthread_jit_write_protect_np,sys_icache_invalidate) is the same sequence, moved intomap_code. The gate istarget_arch = "aarch64"withtarget_osmacos or linux.tests/differential.rsuses the same gate.t27b corpus --json <path>: one record per file{file, reference, t27b, tests, invariants, blockers[], detail}plustotalsandtop_blockers. It is built from the structures the text summary already uses.corpusdoes not run the reference path, soreferenceisskipthere and the lab fills it in.t27b corpus --runner "<cmd> [args]": each per-file child is started through<cmd>. A container has no binfmt_misc, so this is how a qemu-user driver starts its aarch64 children.contrib/railway/t27b-lab/:lab.py: builds t27c natively, cross-builds t27b, runst27b corpus specsunder qemu-user, runst27c test-report <file>natively per file, thencargo test -p t27bunder qemu-user. It serves/latest.json,/runs/<sha>.json,/runs/<sha>.logand/status.json. It re-runs whenT27_REFmoves (polled every 30 minutes)..shfiles, no secrets. The clone is anonymous and the service never writes to GitHub.docs/now/2026-10-04-t27b-railway-lab.md.Lab
t27b-lab, servicet27b-lab, volume at/srv.T27_REFis set to this branch. Set it back tomasterafter this PR merges.First full run, commit 9d87d14, 1190 files under
specs/(https://t27b-lab-production.up.railway.app/runs/9d87d14062f5dacf370a6a46da41596cbf89c40e.json):cargo test -p t27bunder qemu-userThe first deploy's reference step failed with
can't start new thread. The container reports 48 CPUs but has a 24-CPU quota andpids.max1000, and eachzig testspawns about one thread per visible CPU. Commit 9d87d14 sizes the workers fromcpu.maxandpids.max. A fork failure is counted aslab_error, never as pass or fail.Note for #6064
#6064 (
--reference/--reference-cache) is open and conflicts with master, so this PR does not stack on it. Whichever of the two merges second should fill the reference verdict into--json.lab.pyalready prefers the corpus JSON's reference whentotals.reference.ranis true and runst27c test-reportitself only as a fallback.Checks
cargo check -p t27bpasses on macOS arm64 and for the aarch64- and x86_64-unknown-linux-gnu targets (--tests).tools/check_now_entry_shape.py: OK.🤖 Generated with Claude Code