Skip to content

Fix Release mode determinism#19806

Closed
majocha wants to merge 1 commit into
dotnet:mainfrom
majocha:determinism-tables
Closed

Fix Release mode determinism#19806
majocha wants to merge 1 commit into
dotnet:mainfrom
majocha:determinism-tables

Conversation

@majocha

@majocha majocha commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #19732

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/release-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

✅ No release notes required

@majocha majocha changed the title Fix Rekease mode determinism Fix Release mode determinism May 25, 2026
@majocha

majocha commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

OK, release mode failure is confirmed in CI:
image

@majocha

majocha commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

I don't really understand what's going on here. The issue indicated a problem with heaps being reordered internally, but the solution Copilot did does not touch them, instead it adds a additional tie-break sorting of table rows. (?) Yet the determinism now passes, locally and here in CI:
image

EDIT: nope, not fixed, just randomly passes. I desperately need a small solid repro to work with.

@majocha majocha force-pushed the determinism-tables branch from 41c3dee to 842908c Compare May 26, 2026 09:04
@majocha majocha closed this May 26, 2026
@T-Gro

T-Gro commented May 29, 2026

Copy link
Copy Markdown
Member

Maybe we would need some better tweaks to make it fail more consistently?
e.g. changing parallel/sequential or number of cores available in between runs?

@majocha

majocha commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Maybe we would need some better tweaks to make it fail more consistently? e.g. changing parallel/sequential or number of cores available in between runs?

This is a great idea! Comparing parallel/sequential would be great since that's what we're really aiming for.

@T-Gro

T-Gro commented Jun 1, 2026

Copy link
Copy Markdown
Member

Yeah I will do that. IMO it is more likely to fail compared to 2 parallel runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

F# compiler produces non-deterministic metadata #Strings heap layout

2 participants