Add ghc9123 variant and Windows TH crash stress harness#7836
Draft
zeme-wana wants to merge 1 commit into
Draft
Conversation
The Windows (mingwW64) cross build of plutus-core intermittently dies with 'scavenge_stack: weird activation record found on stack' while the Wine-hosted iserv runs the cost-model TH splices (e.g. https://ci.iog.io/build/13125016/nixlog/1). Add scripts/windows-th-crash-stress.sh, which cycles cold rebuilds (nix build --rebuild) of the mingwW64 plutus-core library across ghc96, ghc912 and ghc9123 arms and tallies how often each hits the crash. GHC 9.12.3 (RTS fix #25750) is not in the pinned haskell.nix, so the ghc9123 flake variant and dev shell are inert under the pin: the script selects a newer haskell.nix via --override-input at build time, and the ghc9123 devShell is gated on the compiler being present so flake evaluation keeps working without the override.
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.
What
The Windows (mingwW64) cross build of the plutus-core library intermittently fails with a GHC runtime crash while the Wine-hosted external interpreter (iserv) runs the cost-model Template Haskell splices (
$$(readJSONFromFile ...)inPlutusCore.Evaluation.Machine.ExBudgetingDefaults):Example CI failure: https://ci.iog.io/build/13125016/nixlog/1
This PR adds a stress harness to measure how often the crash occurs per GHC toolchain:
scripts/windows-th-crash-stress.sh— cycles cold rebuilds (nix build --rebuild, so the binary cache is never reused) ofprojectCross.mingwW64.hsPkgs.plutus-core.components.libraryacross three arms —ghc96,ghc912,ghc9123— round-robin, classifies each build (target crash / other iserv crash / other failure / success) and tallies results into a CSV + summary table. Crash logs are kept, success logs dropped. Run on Linux with the IOG binary cache.nix/project.nix— aghc9123flake variant (compiler-nix-name = "ghc9123").nix/shell.nix/nix/outputs.nix— aghc9123dev shell (the lightweightquick-shell, since HLS/fourmolu/etc. have no GHC 9.12.3 releases yet).Why ghc9123 needs special handling
GHC 9.12.3 ships RTS fix #25750 (underflow frame lookups in the bytecode interpreter) — the only plausibly-relevant change for this crash. But the project's pinned haskell.nix (
ac987ef) does not ship GHC 9.12.3, and bumping the pin wholesale breaks the macOS dev shell (no GHC-9.12.3-compatible HLS/ghc-lib-parser releases). So:--override-input haskell-nix github:input-output-hk/haskell.nix/d93d6ed—flake.lockis never touched;ghc9123flake variant is inert under the pin (nothing in CI or the default shells evaluates it);ghc9123devShell is gated onpkgs.haskell-nix.compiler ? ghc9123, sonix flake check/showkeep working without the override. Enter it withnix develop .#ghc9123 --override-input haskell-nix <rev>.Notes for reviewers
ghc96-bumpedarm (same GHC, bumped toolchain) to isolate that variable.Pre-submit checklist: