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 race condition in RequestTelemetryLogger #59669

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

tmat
Copy link
Member

@tmat tmat commented Feb 20, 2022

Fixes race condition that may lead to NRE:

System.NullReferenceException : Object reference not set to an instance of an object.

Stack trace
   at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestExecutionQueue.RequestTelemetryLogger.Dispose() in /_/src/Features/LanguageServer/Protocol/Handler/RequestExecutionQueue.RequestTelemetryLogger.cs:line 132
   at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestExecutionQueue.Shutdown() in /_/src/Features/LanguageServer/Protocol/Handler/RequestExecutionQueue.cs:line 129
   at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestExecutionQueue.OnRequestServerShutdown(String message) in /_/src/Features/LanguageServer/Protocol/Handler/RequestExecutionQueue.cs:line 266
   at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestExecutionQueue.<ProcessQueueAsync>d__17.MoveNext() in /_/src/Features/LanguageServer/Protocol/Handler/RequestExecutionQueue.cs:line 257

@tmat tmat requested a review from a team as a code owner February 20, 2022 01:03
@tmat
Copy link
Member Author

tmat commented Feb 20, 2022

@dibarbet

Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

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

ah that seems better

@tmat tmat enabled auto-merge (squash) February 22, 2022 21:58
@tmat tmat merged commit 587388c into dotnet:main Feb 22, 2022
@ghost ghost added this to the Next milestone Feb 22, 2022
@tmat tmat deleted the LspLoggerRace branch February 23, 2022 01:03
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants