[PROOF / DO NOT MERGE] Release determinism CI is broken on main#19859
Draft
T-Gro wants to merge 1 commit into
Draft
[PROOF / DO NOT MERGE] Release determinism CI is broken on main#19859T-Gro wants to merge 1 commit into
T-Gro wants to merge 1 commit into
Conversation
This draft demonstrates that the current main branch is non-deterministic in Release configuration. 8 parallel iterations maximize the probability that pre-existing races (TypeDefsBuilder counter, ConcurrentStack drain, parallel optimizer Val.Stamp iteration order) trigger at least once. DO NOT MERGE. Evidence-only PR for #19732 / #19810. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
✅ No release notes required |
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.
Purpose
Evidence-only draft. This branch contains no product changes — only a CI configuration flip from
DebugtoReleasefor theDeterminismjob, with 8 parallel iterations to maximize the probability of catching probabilistic races on a single CI run.Hypothesis
Multiple non-determinism races exist on current main, not visible because the existing CI
Determinism_Debugjob disables the optimizer (SetOptimizeOfffor Debug):#Stringsheap layout #19732) — parallel optimizer iteratesValsets by racyVal.Stamp(Interlocked.Incrementglobally assigned)IlxGen.TypeDefsBuilder.AddTypeDef— counter-based type ordering races under parallel codegenGrabExtraBindingsToGenerate—ConcurrentStackdrain order is non-deterministicNiceNameGenerator— global singleton counter across other callersFileIndex— assignment race under parallel parseIf any of these fire in any of the 8 iterations, we see hash mismatches on
FSharp.Compiler.Service.dlletc.Why this matters
PR #19810 fixes (1) but cannot land confidently while (2)-(5) remain hidden. This PR establishes the baseline: Release determinism CI currently fails. Subsequent PRs (#19810 + follow-ups) must drive it back to green by fixing the product, not by reverting CI to Debug.
What to look at
Determinism_Release iter1..iter8job results!=(hash mismatch) andFiles have different contentRelated: #19732, #19810