Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronizes calls to Environment.FailFast. This helps resolve an issue #55939

Merged
merged 3 commits into from
Aug 27, 2021

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Aug 27, 2021

This helps resolve an issue where Windows Error Reporting (WER) fails to trigger (and therefore
fails to collect dumps) when there are multiple threads triggering Environment.FailFast at the same time.

To validate this locally, I set the WER registry keys to (with the appropriate DumpFolder for my machine).

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
    DumpType    REG_DWORD    0x2
    DumpFolder    REG_SZ    C:\cores
    DumpCount    REG_DWORD    0x2

Without this change, about 50% of the time WER failed to capture a dump. I hacked together this script for easier running - https://github.com/dibarbet/roslyn/blob/working_helix_dump_logging/run_tests_iter.ps1. I ran it about 3 times for 30 iterations total, getting dumps 4/10, 6/10 and 4/10 times.

After this change, all 30 iterations successfully collected dumps.

Part of #55639

where Windows Error Reporting (WER) fails to trigger (and therefore
fails to collect dumps) when there are multiple threads triggering Environment.FailFast at the same time.
@jcouv jcouv self-assigned this Aug 27, 2021
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 2)

@dibarbet dibarbet merged commit b9d50c0 into dotnet:main Aug 27, 2021
@ghost ghost added this to the Next milestone Aug 27, 2021
@dibarbet dibarbet deleted the synchronize_failfast branch August 27, 2021 21:26
@dibarbet dibarbet modified the milestones: Next, 17.0.P4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants