Fluent API Deadlocks
See original GitHub issueIn Console Application everything work’s well
IVirtualMachine vm = await azure.VirtualMachines.GetByResourceGroupAsync("*", "*");
PowerState powerState = vm.PowerState;
string ip = vm.GetPrimaryPublicIPAddress().IPAddress;`
but in Web Application I must wrap getting PowerState and IP inside new Task
`
IVirtualMachine vm = await azure.VirtualMachines.GetByResourceGroupAsync("*", "*");
PowerState powerState = null;
string ip = null;
await Task.Run(() => ip = vm.GetPrimaryPublicIPAddress().IPAddress);
await Task.Run(() => powerState = vm.PowerState);
`
Without that application is unresponisive. This state is probably result of deadlock in GetPrimaryPublicIpAddress() method and PowerState property.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
threading, fluent nhibernate and saving data get deadlock
i use C# threading and parsing some data and when i try to save and commit this data with fluent nhibernate i get...
Read more >Issues with Azure Management SDK Deadlocking an await ...
I am trying to build an application that Clones an Azure hosted database using the Azure.Management.Fluent SDK in C#. from the controller I ......
Read more >Deadlock, Starvation, and Livelock
A deadlock is a state in which each member of a group of actions, is waiting for some other member to release a...
Read more >SQL Deadlock on the same exclusively locked clustered ...
I have a couple of thoughts. First of all, the easiest way to avoid deadlocks is to always take locks in the same...
Read more >Concurrency Management in Entity Framework Core
Pessimistic concurrency involves locking database records to prevent other users from being able to access/change them until the lock is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get the same when running
List
onIDatabases
which you get by listing the SQL Servers on Azure. This happens under ASP.NET which has an ambientSynchronizationContext
. I sense that somewhere it has been skipped to callConfigureAwait(false)
on anawait
edTask
andList
calls an async method in a blocking way.asp.net related deadlock issues should have been addressed in v1.2