-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Deadlock in Blazor WASM + CosmoClient that happens in .net7 but not .net6 #79704
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@y2kbugger does it happen also if you are not debugging? |
@thaystg if I've tried configuring as "Production" and it shows it took in the terminal: But in the console it is still seems like debugging is enable when I look at the developer console
|
@y2kbugger publish your app and run the published output |
Oh, okay, for me the question is answered, you are running outside VS, so debugger is not attached. Thanks. |
And just for completeness I served a published app and it still occurs the same way. |
I noticed they have some workarounds for previous deadlock issues that deal occur then there is no debugger attached. https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos/src/CosmosClient.cs#L144 |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsIs there an existing issue for this?
Describe the bugSee: Azure/azure-cosmos-dotnet-v3#3599 When newing up a CosmosClient (either as DI services or in async callback on a page) the entire browser tab will deadlock. This does not occur when I retarget the app to .net6 The CosmosSDK would like to help, but I lack the knowledge of how to pinpoint the deadlock since Blazor WASM doesnt appear to have profiling. Expected BehaviorNo deadlock Steps To Reproducehttps://github.com/y2kbugger/ReproduceDeadlockIssueBlazorWasmNet7 Goto the counter page and put in the key
and click the button. Notice that it makes it past the final print statement before deadlocking. Exceptions (if any)No response .NET Version7.0.100 Anything else?No response
|
|
This issue has been marked |
This issue has been automatically marked |
I've stood up a new cosmos client. can confirm it still fails with the latest dotnet 7.0.11, but without updating other packages |
make sure to pull the latest commit. |
Also confirmed that it still locks in:
|
That could be user code spinning, but it's hard to tell what. |
Even if you comment out the rest of the example, it prints the "Client Created" and still hangs:
|
I wish I knew how to debug in the browser with symbols, but it's too far away from my day job to spend time figuring that out as we have a workaround in place for this. e.g. serverless REST layer. But according to microsoft, direct access via a browser is a supported use case for Cosmos, and they even have it in their Javascript sdk, so this still should be fixed since it's their spa framework.
https://learn.microsoft.com/en-us/javascript/api/overview/azure/cosmos-readme?view=azure-node-latest |
I wasn't able to figure out yet why it's getting blocked |
I'm facing the same issue using .NET 8 and Blazor WASM |
Could you please re-compile with |
sorry I didn't see this. I'll see what I can do tomorrow. I have moved on from .Net stack for new projects but this would be interesting to know. Because we are building enterprise apps, within a private network, monolithic wasm apps would have been great. instead we had to create and host an api which added no value, but was a large complexity burden. |
Related to this Azure/azure-cosmos-dotnet-v3#4551 |
As I'm thinking about it I realized that native stack trace would be again just stack trace of the Mono interpreter. Perhaps it would be better to build debug version of the app and stop in there in C# debugger (VS or VS code). I wonder if that's some abandoned Do the JS events tick ? Easy test setInterval(()=>console.log("UI alive" + new Date().toISOString()),1000); |
Is there an existing issue for this?
Describe the bug
See: Azure/azure-cosmos-dotnet-v3#3599
When newing up a CosmosClient (either as DI services or in async callback on a page) the entire browser tab will deadlock.
This does not occur when I retarget the app to .net6
The CosmosSDK would like to help, but I lack the knowledge of how to pinpoint the deadlock since Blazor WASM doesnt appear to have profiling.
Expected Behavior
No deadlock
Steps To Reproduce
https://github.com/y2kbugger/ReproduceDeadlockIssueBlazorWasmNet7
Goto the counter page and put in the key
and click the button.
Notice that it makes it past the final print statement before deadlocking.
Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
No response
The text was updated successfully, but these errors were encountered: