Repository navigation
DO NOT MERGE — ci(diag): OTP matrix for the RSR oracle segfault - #1032
hyperpolymath wants to merge 1 commit into
Conversation
…ERGE) Diagnostic only, on a draft PR that is closed unmerged. Scores rsr-template-repo at 2ba9126 against standards e064539 with Hypatia at be98f74 and at this PR's head, across OTP 27.3, 28.0, 28.1, 28.2, 28.3 and 28 (Elixir 1.19.4): 5 default runs, one with +JMsingle true, one on the emu flavour when shipped, with gdb backtraces of any crash. The job never fails on a crash. actions.lock gains the workflow's entry (all four refs already locked). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Results: run 42633018429The setup matched the original crash: subject rsr-template-repo
All crashes show the same backtrace: Verified:
Inferred, not proven: The OTP window matches erlang/otp#10588, OTP-19951 in compiler-9.0.5 / OTP 28.4: "Fixed a compiler alias analysis bug that could generate unsafe code for repeated binary segments". In that bug, Nothing was filed upstream and OTP is not pinned anywhere. This PR is closed unmerged. Generated by Claude Code Generated by Claude Code |
## What The **RSR oracle** job in `dogfood-gate.yml` and the scanner in `hypatia-scan.yml` move from OTP `28.3` to `28.5.0.8`. Both cache keys now carry the exact OTP version. ## Why The OTP matrix run in hyperpolymath/hypatia#1032 (closed diagnostic) found the following: - **Crashes:** Hypatia `be98f74` segfaults on every run when it is compiled and run on **OTP 28.1, 28.2 or 28.3**: rc 139 on 5 of 5 runs for each version. The crash is in `sweep_off_heap`, during GC, under `beam_jit_bs_init_bits`. - **Clean:** the same tree runs clean on OTP 27.3, 28.0 and **28.5.0.8**. Hypatia main is clean on all of them. - **Likely cause:** a compiler bug that was fixed upstream in OTP 28.4 (OTP-19951, erlang/otp#10588). This is inferred and not proven: no test compiled the tree under 28.5 and ran it under 28.3. Upstream has already fixed it, so there is nothing to file. Following the owner's ruling to pin around a faulty version window, both jobs move to the version the matrix ran clean. The Hypatia pin stays at `be98f74`, so the scorer is unchanged. **The cache key matters.** The old key, `…-otp28-…`, would have restored a `_build` compiled under 28.3 into the new runtime, and the miscompiled beams would have survived the OTP bump. The new key holds the full version, `otp28.5.0.8`. ## Not in this PR - **`oracle-segfault-diag.yml`** still names 28.3. rsr-template-repo#297 removes that whole file. - **Other 28.3 pins in the estate:** standards `governance-reusable.yml` and `hypatia-scan-reusable.yml`, and Hypatia `ci.yml` and the `rsr-oracle.yml` input default. Those are separate PRs in their own repos. ## Checks run locally - `tests/workflows/validate_workflows_test.sh`, `check_lock_sync_test.sh` and `workflow_edges_test.sh` pass. - `scripts/check-lock-sync.sh` and `scripts/check-workflow-edges.sh` are clean. - The action SHAs are unchanged, so `actions.lock` needs no edit. --- _Generated by [Claude Code](https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE)_ Co-authored-by: Claude <[email protected]>
## What - `governance-reusable.yml`, `hypatia-scan-reusable.yml` and the Hypatia projection job in `self-test.yml` move from OTP `28.3` to `28.5.0.8`. - The two `hypatia-scanner-v4-…` cache keys now include the OTP version. ## Why hyperpolymath/hypatia#1032 ran a matrix of OTP versions: - Hypatia `be98f74` segfaults on every run (rc 139, 5 of 5) when it is compiled and run on **OTP 28.1, 28.2 or 28.3**. - It is clean on 27.3, 28.0 and 28.5.0.8. - The likely cause is OTP-19951 (erlang/otp#10588), fixed in 28.4. That is inferred, not proven. These reusables build whatever Hypatia SHA the caller names, and every consumer runs them. Leaving them on a release whose compiler is known to be faulty puts the whole estate at risk. The cache keys matter on their own. A cached `~/hypatia` holds an escript of beams compiled under the old release. The SHA-only key would have restored that escript under the new runtime, and the guard steps would then have skipped the rebuild. ## Companion PRs - hyperpolymath/hypatia#1037 moves the oracle default and Hypatia's own CI. - hyperpolymath/rsr-template-repo#311 moves the spine's oracle and scanner. ## Checks - All three workflows parse. - No action SHA changed, so the locks are untouched. - The local runs of `check-workflow-*` and `check-lock-sync` give the same results here as on unmodified main. They fail there too, because this container's `yq` is the Python one. CI is the real check. --- _Generated by [Claude Code](https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE)_ Co-authored-by: Claude <[email protected]>
## What - `rsr-oracle.yml`: the `otp-version` input default changes from `28.3` to `28.5.0.8`. - `ci.yml`: both "identical to the dogfood gate" setup steps move to `28.5.0.8`. The Mix cache key and its restore prefix now include the OTP version. - `docs/consumers/rsr-oracle.adoc`, `docs/consumers/standards-governance.adoc` and `CHANGELOG.adoc` are updated to match. ## Why The matrix in the closed diagnostic PR #1032 found: - Hypatia `be98f74` segfaults every time on **OTP 28.1, 28.2 and 28.3**: 5 of 5 runs per version exited with rc 139, in `sweep_off_heap` under `beam_jit_bs_init_bits`. - The same tree is clean on 27.3, 28.0 and 28.5.0.8. - The likely cause is OTP-19951 (erlang/otp#10588), which was fixed in 28.4. That is inferred, not proven. Current main runs clean on 28.3 too. But 28.3's compiler can miscompile code, so keeping the oracle's default toolchain on it leaves every consumer that relies on the default exposed. The cache-key change matters on its own. The old key ignored the OTP version, so a `_build` compiled under 28.3 would have been restored and reused under 28.5.0.8. ## Companion PRs - hyperpolymath/rsr-template-repo#311 moves the spine's oracle and scanner. The `ci.yml` comment says to bump both together. - A standards PR moves the reusable workflows. The `standards-governance.adoc` line edited here describes those workflows, so it is accurate once that PR merges. ## Checks - Both workflows parse with Ruby YAML and yq. - No action SHA changed. --- _Generated by [Claude Code](https://claude.ai/code/session_01E294yTkKk127qgKEXFFDBE)_ Signed-off-by: Jonathan D.A. Jewell <[email protected]> Co-authored-by: Claude <[email protected]>
) ## Why `rsr-oracle.yml` defaults to OTP 28.5.0.8. The #1032 matrix found that release clean, but later trees crash it. The crash is in `sweep_off_heap`, reached from the JIT's `bs_init_bits`, the same crash as in #1032. OTP 27.3.4.19 runs cleanly on the same trees (rsr-template-repo#333, #339). The template pinned 27.3.4.19 in its own copies (rsr-template-repo#335, #340). That fixes only the template. Every other caller of this reusable workflow still gets 28.5.0.8 by default. This PR fixes the default here, at source. ## Changes - `.github/workflows/rsr-oracle.yml`: the `otp-version` default changes from `28.5.0.8` to `27.3.4.19`. - `.github/workflows/ci.yml`: the 2 jobs pinned "identical to the dogfood gate", and their Mix cache keys, change to `27.3.4.19`. The template's gate runs 27.3.4.19 now. - `docs/consumers/rsr-oracle.adoc`: the stated toolchain changes to match. - `docs/consumers/standards-governance.adoc`: states the OTP the pinned standards reusables really run (28.3 at `7641c7f`). Those reusables move to 27.3.4.19 in metadatastician/standards#1508. - `CHANGELOG.adoc`: a new entry corrects the entry of 2026-11-09 that called 28.5.0.8 clean. ## Evidence Measured on 2026-11-13: this repository at `be98f74`, `mix hypatia.rsr_score` on 3 rsr-template-repo trees, 5 runs each. OTP and Elixir builds come from builds.hex.pm, SHA-256 verified. | OTP | Elixir | `3213333` | `a55669e` | `af8665c` | |---|---|---|---|---| | 28.5.0.8 | 1.19.4 | 5 of 5 clean | **5 of 5 exit 139** | **5 of 5 exit 139** | | 27.3.4.19 | 1.19.4 | 5 of 5 clean | 5 of 5 clean | 5 of 5 clean | | 29.1 | 1.20.5 | 5 of 5 clean | 5 of 5 clean | 5 of 5 clean | On OTP 28.5.0.8, neither a UTF-8 locale nor `+JMsingle true` stops the crash (3 of 3 each). The scanner crash (`hypatia-cli.sh scan`) comes from the template's CI record (rsr-template-repo#339); I did not rerun it. ## Checks I ran - Both edited workflows parse as YAML. - `scripts/check-readme-claims.sh` passes. ## Limits - OTP 29.1 is clean in these runs, but it needs Elixir 1.20, so that row changes 2 things. - The cause inside OTP is not known, and it is not yet reported to erlang/otp. - The red "Build Test Images", "Integration Status", "Rust Dependency Audit" and "Security Status" checks also fail on `main`. None of them is a required check. The audit failure is fixed in #1071. - **Downstream:** canonry, chancel, czech-file-knife and occupancy-types still pin 28.5.0.8 in their own `dogfood-gate.yml`. anytype, autoformal-fidelity, secret-types, system-et and zig-unorm (and the 4 above) pin it in `hypatia-scan.yml`. These are copies of the template, so they follow the template's realign. This PR does not change them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0136P7Zp7h93ZYjxoVNQQYRR --------- Co-authored-by: Claude <[email protected]>



Diagnostic only. This draft PR will be closed unmerged once the matrix has run. Do not merge it, and do not mark it ready for review.
Question
mix hypatia.rsr_scoresegfaults (exit 139) on 30/30 runs when it scoreshyperpolymath/rsr-template-repoat2ba9126against standardse064539. The setup is Hypatiabe98f74on Elixir 1.19.4 / OTP 28.3 (erts 16.2.2). The same setup crashes 0/30 times on tree0c9dc42. gdb shows the crashing scheduler insweep_off_heap(erl_gc.c), reached fromminor_collection←gc_test←beam_jit_bs_init_bits. That points to heap corruption from earlier in the run.We want to know three things:
+JMsingle true, or on the interpreter flavour?What this PR adds
.github/workflows/oracle-segfault-diag.ymlruns only onpull_request, with a paths filter on itself. Its matrix is OTP {27.3, 28.0, 28.1, 28.2, 28.3, 28} × Hypatia {be98f74, this PR's head}. Each job:ERL_FLAGS='+JMsingle true',ERL_AFLAGS='-emu_flavor emu'if that flavour is installed (if not, the job records that),bt 40of the crashing thread for any crash.A crash never fails the job.
.github/workflows/actions.lockgets an entry for this workflow. All four SHA-pinned refs are already locked.Nothing upstream is filed and OTP is not pinned anywhere. The results go into one summary comment, and then the PR is closed.
Generated by Claude Code