Home Dashboard Directory Help
Search

Azure SDK Compute Emulator: Controller actions hit multiple times in ASP.NET MVC 4 App by sammy34


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


17
0
Sign in
to vote
Type: Bug
ID: 778518
Opened: 2/4/2013 10:46:37 PM
Access Restriction: Public
2
Workaround(s)
view
9
User(s) can reproduce this bug

Description

For a detailed description of the problem please see:

http://stackoverflow.com/questions/13779410/controller-actions-hit-multiple-times-asp-net-mvc-4-app-running-in-azure-emula
Details
Sign in to post a comment.
Posted by Microsoft on 5/7/2014 at 3:43 PM
Thanks for reporting this issue. This was a known issue in earlier versions of the SDK (prior to SDK2.2) and was no longer reproducible as of SDK2.2. Please reactivate this bug if you are still able to reproduce it on the latest version of the Azure SDK.

Thanks,
Sameer Motwani,
Microsoft Azure
Posted by Ian Drennan on 4/7/2014 at 1:35 PM
Bill Christenson - we had the same experience. We all rolled back to Windows 7. Hardly a good solution but given the loss of development time there was not other option. ZERO issues since then.

MS - any luck reproducing on your end? I find it hard to believe that in a small office like ours we've had multiple instances of this, and you guys haven't been able to replicate it once yet.
Posted by Bill Christenson on 2/14/2014 at 8:03 AM
Update: After having the reported issues with Windows 8.1, I ended up reverting back to Windows 7 on 2/6/2014. I've had no issues running the same code/solution on Windows 7 for the past week.
Posted by Bill Christenson on 2/5/2014 at 11:11 AM
I've spent the last 2 days trying to figure this issue out. It's been going on since upgrading to Windows 8.1 pro. Same symptoms as others: breakpoints hit multiple times, requests often hang or simply don't respond. If you navigate in the application after a hang, sometimes the web application will work fine for a few requests then hang again.

Here are my specs: Windows 8.1 Pro 64-bit install, VS 2013 Update 1, Azure SDK 2.2, Hyper-V disabled, office 2013, lync, sql 2012 dev

Steps to reproduce: Create a brand new Web Application from the VS templates and install Azure Caching 2.2. Enable Azure Cache session state. Create a new cloud project and add the web application as a web role. Turn on collocated caching. This setup runs great for the first few requests. Let it idle for about 30 seconds then all hell breaks loose.

If you disable Azure Caching, the web application appears to work better, but will still hang sometimes. At least it doesn't hang indefinitely.

Workarounds Tried: I've uninstalled the Azure SDK, VS 2013, IIS and reinstalled all of them. I've tried to flush the DNS, this did not help. Uninstall Emulator and delete the dftmp folder and reinstall the Azure 2.2 emulator.

Additional Info: After giving Windows 8.1 a try, I started having these problems. I think I'll have to revert back to Windows 7...
Posted by Ian Drennan on 1/16/2014 at 5:37 AM
To the MS team

"Can anyone help us verify that this repro's with a clean project with no prior upgrade or other additional components? "

Yes, my system is a 100% clean install. VS 2013 only installed (clean of course given the rebuild). Latest Azure 2.2 only installed as well. It's about as clean as it gets :)

Posted by Ian Drennan on 1/16/2014 at 5:27 AM
Exact same situation here. We have 2 devs (including myself) on Windows 8 (clean installs for both) that are having this issue. We are using ASP MVC 5 and the latest windows 8 pro installs.

It's incredibly frustrating and makes development near impossible when it happens - we're seriously looking at rolling back to windows 7 until this can get resolved.
Posted by Johan van Tonder on 11/20/2013 at 6:35 AM
Hmmmm, James and Microsoft...

Can you install Hyper-V (full) on your Win 8 dev boxes? If you can, install it and then see if the problem comes back... looks like this guy traced it down to Hyper-V's virtual Ethernet adapters... http://bit.ly/1b7QQcA

I've done as he suggested and now I don't have the problem on my Win 8 dev machine anymore. However, it is still a nuisance because I really like to spin up VM's on demand for local testing purposes...

The reason (it seems now) it doesn't happen Windows 7, is because you can't enable/run Hyper-V on it as far as I know.

On the other hand, he (the guy in the stackoverflow post) also said that another Win 8 machine without Hyper-V also had the same problem, but an "ipconfig /flushdns" fixed the issue.

I hope there is some kind of agreement the Win 8 (and Win Server 2012) Networking team and the Azure team can work out together to solve this problem.

Kind regards.
Posted by James D. Schwarzmeier on 10/19/2013 at 9:21 AM
Well, I got my problem resolved.

When Windows 8.1 came out, I did an in-place upgrade via the store, and left Visual Studio as-is. That did not solve my problem, so I decided to do a complete reinstall.

I also took the opportunity to replace an older Kingston SH100S3 SSD to a newer Samsung. I installed Windows 8.1 Pro x64 off an MSDN .iso, Visual Studio 2013 Ultimate, and the latest VS2013 Azure SDK via WebPI. Afterwards, both the test case described in the Stack Overflow question as well as my actual app work correctly now! No more stuck requests, slow requests, duplicate requests, etc.

Bottom line, one (or more) of the three following changes corrected the issue:
- Moving off the Kingston SH100S3 SSD
- Upgrading to VS 2031
- A clean install of Windows 8.1
Posted by James Schwarzmeier on 10/9/2013 at 3:02 PM
I'm not on a brand new install of Windows and I'm on VS 2012 Update 3, but I did just create the projects from scratch as described in the SO question and was *quickly* able to repro the issue. Sometimes the controllers are hit multiple times, sometimes it works correctly, and sometimes requests just hang. In fact, even though the SO question describes having two web projects in the solution, that's not even required; if I directly debug the project associated with the cloud service, it works fine. When I run it as part of the cloud service, it's not.

Regardless I attached the solution I just created to this bug. I would be happy to demo it to anyone from Microsoft if that would help.

Long term I plan I to pave my machine and install Windows 8.1 and VS 2013 RTM, once the later is available on MSDN. Before I install any other software on my machine I will test this out and see if I experience the same issue or not. However, I would really like to see this investigated further in case those upgrades don't help.
Posted by Microsoft on 10/9/2013 at 11:29 AM
I'm from the Azure SDK team. We apologize for the inconvenience you are experiencing with this issue. We tried to reproduce this issue again to no avail. This is with a clean Win8 x64 + VS 2012 Ultimate install. We attempted the same scenario by creating a new MVC4 web role project and toggling between the About and Contact page during debugging. I didn't see the same endpoint getting hit multiple times and the IISExpress log showed the same thing as well. We tried this with both SDK 1.8 and 2.2.

Can anyone help us verify that this repro's with a clean project with no prior upgrade or other additional components?

Thank you!
Posted by JovtonZA on 10/2/2013 at 2:29 PM
I see the Azure SDK team only accepts bug reports on their GitHub repository. Microsoft, you really need to (AGAIN) standardize your bug reporting mechanism across the whole company. I don't think there should be exceptions. Are you getting too big now to manage everything? Are you losing control over your development departments and -standards?
Posted by James Schwarzmeier on 8/25/2013 at 6:02 PM
I had opened a ticket with Azure support for this, and after over two months they came back and said they couldn't reproduce the issue. They suggested running VS in safe mode, which didn't help. It seems the issue is dependent on some aspect of a computer's setup -- either the hardware, or other software installed. Unfortunately the ticket was closed with no resolution. Not happy.

Maybe we can see if there is a pattern to those that affected by this.

I'm running on a Dell Precision M6600 with 64 bit Windows 8, fully patched. Other notable software I have installed:
- Office 2013, 64 bit
- SQL Server 2012 SP1 + SSMS
- Oracle DB
- Reflector
- Expression Studio
- GiMP
- XML Spy
- Firefox
- TotalMedia Theater
- Windows Media Center
Posted by JovtonZA on 8/20/2013 at 6:04 PM
I think we have a final conclusion: Azure team needs to work around a Windows 8 bug. For developers using Azure Storage and Caching libraries, see the "workarounds", thanks. For Azure Team members, see the stackoverflow.com article (and their related ones too) in my previous comment (before this one). Thanks.
Posted by JovtonZA on 6/7/2013 at 7:14 AM
I've observed another issue related to this one. I have relpied to posts on social.msdn.microsoft.com which talks about similar symptoms. I have a sunny feelings that it is related to the following bug found in Windows 8:

http://stackoverflow.com/questions/12464185/windows-8-net-tcp-acceptasync-callback-not-firing-blocked-by-console-readlin

An then the MSDN foums:

http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/262681e4-7922-4d24-950a-ba0cac50994f

http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/43b9120a-9a31-4736-8e15-6f8ec7151b30

http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/5764cd0f-fda1-4cfa-ae35-808210bae77e


This is the exception in the Windows Event log, as soon as we get the hanging problem…

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2013-06-07 01:25:09 PM
Event time (UTC): 2013-06-07 11:25:09 AM
Event ID: 386a9f59e89b41c69b495dc8b91ad8ba
Event sequence: 16
Event occurrence: 1
Event detail code: 0

Application information:
    Application domain: /LM/W3SVC/1273337584/ROOT-1-130150778290028156
    Trust level: Full
    Application Virtual Path: /
    Application Path: E:\SourceCodes\MyHiddenPathToMySourceCodeProjectFiles\
    Machine name: MYMACHINENAME

Process information:
    Process ID: 5676
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
    Exception type: DataCacheException
    Exception message: ErrorCode<ERRCA0018>:SubStatus<ES0001>:The request timed out.. Additional Information : The client was trying to communicate with the server: net.tcp://127.255.0.0:20004/.
at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination)
at Microsoft.ApplicationServer.Caching.SocketClientProtocol.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle, String region, Boolean lockKey, IMonitoringListener listener)
at Microsoft.ApplicationServer.Caching.DataCache.<>c__DisplayClass8b.<GetAndLock>b__8a()
at Microsoft.ApplicationServer.Caching.DataCache.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)
at Microsoft.Web.DistributedCache.DataCacheForwarderBase.<>c__DisplayClass31`1.<PerformCacheOperation>b__30()
at Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(Action action)
at Microsoft.Web.DistributedCache.DataCacheForwarderBase.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)
at Microsoft.Web.DistributedCache.BlobBasedSessionStoreProvider.GetItem(HttpContextBase context, String id, Boolean acquireWriteLock, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions)
at Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions)
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



Request information:
    Request URL: http://127.0.0.1:82/asset/Get?file=/submitWait.gif
    Request path: /asset/Get
    User host address: 127.0.0.1
    User:
    Is authenticated: False
    Authentication Type:
    Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
    Thread ID: 11
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination)
at Microsoft.ApplicationServer.Caching.SocketClientProtocol.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle, String region, Boolean lockKey, IMonitoringListener listener)
at Microsoft.ApplicationServer.Caching.DataCache.<>c__DisplayClass8b.<GetAndLock>b__8a()
at Microsoft.ApplicationServer.Caching.DataCache.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)
at Microsoft.Web.DistributedCache.DataCacheForwarderBase.<>c__DisplayClass31`1.<PerformCacheOperation>b__30()
at Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(Action action)
at Microsoft.Web.DistributedCache.DataCacheForwarderBase.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)
at Microsoft.Web.DistributedCache.BlobBasedSessionStoreProvider.GetItem(HttpContextBase context, String id, Boolean acquireWriteLock, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions)
at Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions)
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Posted by Johan van Tonder on 5/30/2013 at 2:46 AM
I apologize, my previous comment was only related to the long wait-times experienced. But then again, the fix is only temporary, and doesn't last long, maybe two or three debug runs, then I have to re-create it again.
Posted by Johan van Tonder on 5/30/2013 at 2:41 AM
Thank you James. Another annoying workaround is to delete and recreate the DevelopmentStorageDb20 database used by Azure Storage on your SQL installation (localdb, SQL Express or real SQL server, depending on your scenario). Seems to be working most of the time.
Posted by James D. Schwarzmeier on 5/27/2013 at 8:53 PM
That sounds about right for me. I think it was around the SDK 1.7, but it wasn't until later that I became convinced it was a problem with the SDK/Emulator (as opposed to my code or project structure).

I don't think it's a conflict between 1.8 and 2.0. The storage NuGet package has a dependency on any configuration manager package with version >= to 1.8. In my case, the projects actually reference version 2.0.1.0 of configuration manager. In fact, I don't even have any SDKs prior to 2.0 installed on my PC or referenced via NuGet packages.
Posted by Johan van Tonder on 5/23/2013 at 3:53 AM
I want to add to me previous comment: We've actually been experiencing emulator problems since SDK 1.7, after upgrading the projects. Some library references had to be manually changed. I've checked all the library references and all of them are version 2+. However, I've noticed that my references to the WindowAzure.Storage.2.0.5.1 NuGet package are dependent on Microsoft.WindowsAzure.ConfigurationManager 1.8.0.0, and now I'm wondering if this could cause a clash between the internal workings of Azure SDK 2.0 and 1.8.
Posted by Johan van Tonder on 5/22/2013 at 2:02 AM
Me and my team also experience the same issues that James does, i.e. Controller actions hit multiple times even though requests are made only once, and ALSO requests that hang and/or take extremely long to respond. We use Azure 2 and Azure Storage 2, Caching Roles, and Azure Diagnostics trace listeners.
Posted by James D. Schwarzmeier on 4/3/2013 at 8:56 AM
I am experiencing this issue as well, fairly consistently. My app runs just fine in Azure itself. It's only in the development environment that I have this issue. Sometimes controllers are hit multiple times, sometimes requests take a very long time to respond, and sometimes they never respond at all. In my case I have to use the Azure emulator because I make use of Azure functionality beyond simple web projects.

Microsoft, are there any updates on this? Is there anything I can do from my end to help diagnose a root cause?
Posted by Microsoft on 2/5/2013 at 1:36 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 2/4/2013 at 10:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by JovtonZA on 8/20/2013 at 6:01 PM
Revert back to Windows 7. Please see the following forum topic and read all the comments to the end, thanks: http://social.msdn.microsoft.com/forums/wpapps/en-us/262681e4-7922-4d24-950a-ba0cac50994f/windows-azure-caching-while-debugging-request-timeout?prof=required

Azure TEAM!!! Listen to these guys, We have a big reproducible bug, and have you guys noticed at all? Thanks.
Posted by sammy34 on 2/4/2013 at 10:55 PM
A far-from-ideal workaround that may work in some cases (i.e. cases where it is ok to bypass the the functionality of the Azure emulator and debug straight on IIS underneath) is also described on this page:

http://stackoverflow.com/questions/13779410/controller-actions-hit-multiple-times-asp-net-mvc-4-app-running-in-azure-emula
File Name Submitted By Submitted On File Size  
Test.zip 10/9/2013 19.58 MB