-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[release/6.0] [wasm][debugger] Fixing the race condition while modifying pending_ops #80190
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
[release/6.0] [wasm][debugger] Fixing the race condition while modifying pending_ops #80190
Conversation
Tagging subscribers to this area: @thaystg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Active customer issue on LTS with a well tested fix, makes sense to me if you're confident in the backport.
Approved by Tactics (7.0.3).
|
The wasm failure is not related to the PR. The debugger-tests I ran locally and they are passing. |
Thanks for checking. Let's get this merged. |
Hello, @thaystg!! I do not know the correct terminology to use but how can I tell which version of .NET 6 and when this will be released to the public? Thank you!! |
@mwasson74 Version 6.0.14 will contain this fix, which is the February Servicing Release. |
Excellent, thanks so much @carlossanlop!! I saw the milestone was .NET 7 and wasn't sure if it was on the right "track" to being released to a new .NET 6 version. |
Apologies. I applied the wrong milestone but it's corrected now. |
Fixing the race condition, modifying pending_ops, as discussed here:
#76900
Fixes: #68402
Backport of fdc0d16 to release/6.0
Customer Impact
There isn't a easy way to reproduce it, but the customer is debugging his app, then suddenly this error message is showed, and the debugging session is aborted, the customer needs to start the app again to continue debugging.
fail: Microsoft.WebAssembly.Diagnostics.DevToolsProxy[0] DevToolsProxy::Run: Exception System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks') at System.Threading.Tasks.Task.WhenAny(Task[] tasks) at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)
There was a racing condition while adding and removing items from pending_ops, that is the list with the messages which were sent from the BrowserDebugProxy, @radical refactored this code and now it's using ChannelWriter and ChannelReader to avoid this racing condition on the pending_ops list.
Testing
Manually tested.
Risk
Low risk, applying a change that is already landed on .net7.
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.