Repository navigation
ci: key the engine cache on CPU flags, drop a cached engine that dies with SIGILL (#1657) - #1664
Merged
Merged
Conversation
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 15:57
…p a cached engine that dies with SIGILL The engine is compiled with -march=native, and the CI cache key named the CPU by its model name only. Hosted runners that report the same model name do not all expose the same instruction set, so a binary compiled on one was restored onto another and died with an illegal instruction on every TypeScript case. The key now hashes the model name and the flags line of /proc/cpuinfo. The driver also removes a locally cached binary that exits with SIGILL, so a bad entry in a shared cache kills one run, not every run after it.
swapnilpaliwal-sd
force-pushed
the
fix/ts-engine-cache-cpu-flags
branch
from
September 28, 2026 15:58
97b0178 to
a2276bd
Compare
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1318, #1657
What was wrong
engine (typescript)on #1657 (run 36444733865) failed every case withsolve client-only. The solve log says why: the cached engine binary died at startup withIllegal instruction (core dumped)on every fixture and case. The rules and the 0.1.5 branch are fine: other PRs into 0.1.5 at the same time passed the TypeScript suite (78/78) with a freshly compiled engine.The driver compiles the engine with
-march=native. The CI cache key for the compiled engine (added in #1318) covers the engine id, the driver, and the CPU, but it identifies the CPU by themodel nameline of/proc/cpuinfoonly. Hosted runners that report the same model name do not all expose the same instruction set. #1657's earlier run compiled and saved the TypeScript engine on one runner (cache entry created 12:27 onrefs/pull/1657/merge); the next run restored it onto a runner with the same model name but fewer instructions, and it crashed with SIGILL before solving anything. The cache step saw a hit, so the job never recompiled, and every later run on that PR would have failed the same way.The change
.github/workflows/ci.yml: the CPU part of the key hashes themodel nameandflagslines of/proc/cpuinfo, which is what-march=nativedepends on. A binary is now only restored onto a CPU with the same instruction set.graph/pipeline/run-souffle.sh: if a locally cached engine (not a packaged one) exits with 132 (SIGILL), the driver deletes it and reports that it was compiled for a different CPU. The next run recompiles, so one bad entry in a shared cache does not break every later run. Tested separately: a binary that raises SIGILL is removed and the exit code is passed through; a binary that succeeds, or fails with any other code, is left in place.The key change means every language's engine recompiles once on the first run after this merges.
No engine rules changed, so there is no corpus smoke to report. Not yet measured on the full corpus or on held-out projects; the smoke numbers above are the only corpus numbers.