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

Fix deadlock in GetDotNetSdkVersion #2622

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

Korexio
Copy link
Contributor

@Korexio Korexio commented Aug 22, 2024

If the dotnet command writes to standard error this can cause a deadlock in GetDotNetSdkVersion.
While dotnet --version usually does not write to standard error, this can happen if the dotnet executable is instrumented or if a custom dotnet command is used.
The reason for this is that standard error is redirected but not read by GetDotNetSdkVersion, similar to #1629.
The fix is to simply not redirect standard error as it is not read anyway.

@timcassell timcassell merged commit c8105aa into dotnet:master Aug 22, 2024
8 checks passed
@timcassell timcassell added this to the v0.14.1 milestone Aug 22, 2024
@adamsitnik
Copy link
Member

@Korexio thank you for providing a very simple fix with a detailed explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants