Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Browserlink can cause deadlocks in Web API calls #248

Closed
Mertsch opened this issue Oct 28, 2015 · 3 comments
Closed

Browserlink can cause deadlocks in Web API calls #248

Mertsch opened this issue Oct 28, 2015 · 3 comments

Comments

@Mertsch
Copy link

Mertsch commented Oct 28, 2015

Consider the following scenario

Microsoft.VisualStudio.Web.BrowserLink.Runtime.dll!Microsoft.VisualStudio.Web.BrowserLink.Runtime.HttpAdapterRequestStream.Write
[External Code]  
<ProjectName>!<ProjectName>.Controllers.NotificationController.GetAllAfter(ulong notificationId) Line 29     
[Resuming Async Method]  
[External Code]  
<ProjectName>!<ProjectName>.Services.NotificationService.Publish(string type, int itemId, string messsage) Line 38   
<ProjectName>!<ProjectName>.Services.ItemService.DoSomethingWith(int itemId, int userId) Line 186    
<ProjectName>!<ProjectName>.Controllers.ItemController.DoSomethingWith(int itemId) Line 72   
[External Code]  

ItemController.DoSomethingWith is called from the client, performs some operations and goes to the notification service. The notification service has a certain amount of subscribers, waiting to be notified (answering their requests).

The call stack shows a path within the application that could never happen in code, as only external clients can call a controller, never a service.
But this helper module does, which therefore causes a deadlock within my notification controller, which uses a lock to protect its data from concurrent access.

Note that I have a pure Web API project with no HTML pages ever rendered
Using ASP.NET 1.0.0-beta8

@BillHiebert
Copy link

@madskristensen @jodavis

@sayedihashimi
Copy link
Contributor

TFS: 162789
I've added this to our internal TFS, we will reply back here soon.

@webtools-bot
Copy link

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!

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

No branches or pull requests

4 participants