How can we get past the 'Deadly Exception' ?
We are getting the Deadly Exception (see this page) on a callback crashing our server application. It is probably an http call. More than a week has been spent trying different setups but alas... We have a Client/Server application with ~500000 lines of C# code. Its purpose is to perform maintenance operations on network cameras ("Axis" rings a bell??). Basically we are doing http GET + POST operations and SSDP + Bonjour to discover units on the local subnet. QA have been doing stability runs for us for a particular kind of operation: installing and starting an "App" on cameras. So, this means: ask camera for capabilities, send a binary file (about 20k) and then a Start command. This is done in parallel on 100 cameras making a loop every minute. To get the necessary volumes of cameras - 100 to 200 - we have a camera emulator application running. And here comes the setup that leads to the crash: to emulate many cameras on one machine we let each "virtual" camera have a different port but the same IP address. This emulator is often run on the same machine. It takes around 2-10 minutes of looping to get the Deadly Exception. If we monitor "Connections Established" in perfmon it shows that the crash comes when the number of connection is at its peak (could be 700) somewhere around where .net makes a big sweep (to clean up unused connections) taking down the number to about 100. This sweep comes typically every eight minute. During our search for a culprit we have tried to remove different subsystems generating network traffic. We see that the time-to-crash increases. But it never disappears. We blocked all incoming UDP packages (NOTIFY's from ~400 real cameras) and this increased stabilty to ~30 minutes. We tried the suggestions by Microsoft Support referenced in the page mentioned above (see this page). We also tried to increase ServicePointManager.DefaultConnectionLimit to 10000 (!) All in all, we agree with the conclusion in the referenced pages: "apparently there is a race condition in the winsock api (which is what is used internally by our .NET Async Http Requests)". and it is triggered "when the CPU is under exceptionally high load".. Q1: Will the race condition be addressed in the upcoming release of .net ? Q2: Is there some other known work-around not mentioned in above two pages we can use ? /Bjrn The links are: http://stackoverflow.com/questions/6171997/deadly-exception-how-to-catch-system-net-internalexception-system-error http://www.computercabal.com/2011/11/aspnet-serialization-exception-crash.html
May 2nd, 2012 4:16am

Hi Bjrn, I suggest you can go to MSDN forum for further assistance. .NET Framework Developer Center The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. Hope this helps Vincent Wang TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2012 4:55am

Hi Bjrn, I suggest you can go to MSDN forum for further assistance. .NET Framework Developer Center The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. Hope this helps Vincent Wang TechNet Community Support
May 3rd, 2012 11:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics