ASP .NET MVC Application crashes randomly - c#

I have a web site developed in ASP .NET MVC 5. It was working normally during last 9 month but since the web site got many active users (about 200 concurrent) it started to crash randomly in every 25~90 min. The strange part is that there is no exception in my log and the only exception that I could find is this in my event log:
Faulting application name: w3wp.exe, version: 8.5.9600.16384, time
stamp: 0x5215df96 Faulting module name: ntdll.dll, version:
6.3.9600.16408, time stamp: 0x523d5305 Exception code: 0xc0000005 Fault offset: 0x0000000000055a0b Faulting process id: 0x2340 Faulting
application start time: 0x01d0e9f87a1fba57 Faulting application path:
c:\windows\system32\inetsrv\w3wp.exe Faulting module path:
C:\Windows\SYSTEM32\ntdll.dll Report Id:
97868357-55f2-11e5-80b8-a0d3c1fba76b Faulting package full name:
Faulting package-relative application ID:
Can any body explain me why it's happening and I can get more detail about exception and it's possible resolutions?
Update 1:
I found two hot fixes (https://support.microsoft.com/en-us/kb/2679415 and https://support.microsoft.com/en-us/kb/2640103 in Microsoft site which seems that is the case. One of them is not applicable for Windows 2012 :| the other one is not accessible to public. My emails to Microsoft site is also not answered!
Update 2:
Finally after hours and hours of research and code review I found cause of problem. In my code I was loading a DbSet from my Entity Framework db context. The records of database in that table was huge and because of this my app was crashing. And because I also had app pre initialization configured in IIS after crash again it started to load that DbSet again and here was a loop of crashing and crashing!

Related

Is it possible to trap a ucrtbase.dll fault in Visual Studio debugger

I need to be able to trap a ucrtbase.dll fault in our application, can't seem to find any good way to do it. Is it possible to capture this in the VS debugger to see where we are on the stack when the fault occurs?
We see issues more often these days where our application goes unresponsive and shuts down with nothing in our logs. We do see the following in the Eventlog:
Faulting application name: ******************************
Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x2bd748bf
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x3754
Faulting application start time: 0x01d8faaaf85feff3
Faulting application path: ********************************
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: b56fdb9c-6b0a-4186-9d0e-73570b51c0d2
Faulting package full name:
Faulting package-relative application ID:
Event log shows there is a WER report, with no usable data...
If this is not the proper place to address this query, please advise on the proper forum to post as a ucrtbase Windows issue for tracking.
Additional:
I found the following report on ucrtbase.dll with version: 10.0.19041.789: but we are not running WSL -> more likely the problem is in ucrtbase.dll or possibly hardware than an application/platform issue.
=-=-= Original: https://github.com/microsoft/WSL/issues/8256
Please advise.
Thanks much,
-Timothy
tried capturing in debugger for triage, no luck.

How to diagnose fault in crashing UWP app

I have a UWP application which runs fine from Visual Studio with the debugger attached. If I run the app standalone, from the start menu - which is the app that Visual Studio has deployed - it will start, but crash when I invoke one of the functions in the app.
UWP provides absolutely no information - the window disappears and I get the following in the Event Viewer:
Faulting application name: MyApp.Uwp.exe, version: 1.0.0.0, time stamp: 0x5c889173
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.207, time stamp: 0x36bacadb
Exception code: 0xc000027b
Fault offset: 0x0086b264
Faulting process id: 0x27f4
Faulting application start time: 0x01d53db7eaba0778
Faulting application path: C:\src\MyApp\bin\x86\Debug\AppX\MyApp.Uwp.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 009e5859-3f05-4790-8072-37af666acb7e
Faulting package full name: 59640b3f-2209-4686-8f9a-9f8748b9753c_1.0.0.0_x86__9617mk99wz2v0
Faulting package-relative application ID: App
If I start the app via the Start menu, then attach the VS debugger, it doesn't crash.
How can I get a stack trace and work out what is going wrong here?
I want to know if it's possible to get a stack trace or any information out of a crashed UWP app.
You could use HockeyApp to capture the exception call stack, exception message, exception type name, file name and line number which caused a crash in the app. For more detail please refer this document.
Please note: In order to symbolicate crashes for .NET UWP applications you need to upload symbol (*.pdb) files

w3wp.exe fails and web restarts every ~75 seconds

We have a farm of 5 Windows Server 2012 R2 servers, running IIS.
Under load, one website start failing every ~75 seconds and it keeps going on and on, until load goes down at night time.
Only thing we have to go after, is the message in the evenlog :
Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
Faulting module name: clr.dll, version: 4.0.30319.34209, time stamp: 0x5348a1ef
Exception code: 0xc00000fd
Fault offset: 0x000000000001ff16
Faulting process id: 0x73d0
Faulting application start time: 0x01d31e49290c950a
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 8a491461-8a3c-11e7-80e8-d89d6731bc04
Faulting package full name:
Faulting package-relative application ID:
If I look at the "Workers" inside IIS, I just see a bunch of requests and the wait time keeps going up and up when I press F5 - until the process is crashing/restarted.
Any advise ?
The application is written in C#/VB, and uses controls from Telerik, saves data inside a Sql Server and caches via a distributed nCache running on 5 servers.
The application has been running for months without updates, other that patches to the OS regularly.

Faulting module name: KERNELBASE.dll

My application crashes without any application error logging, when I checked Event viewer I found below info. Can some explain why this would happen and how to prevent it?
Faulting application name: MyApplication.exe, version: 1.0.0.0, time
stamp: 0x5964fac7 Faulting module name: KERNELBASE.dll, version:
6.1.7601.23807, time stamp: 0x5915f98e Exception code: 0xe0434352 Fault offset: 0x0000c54f Faulting process id:
0x1494 Faulting application start time: 0x01d300cbc9034bc0
Faulting application path: Path of MyApplication.exe Faulting
module path: C:\Windows\syswow64\KERNELBASE.dll Report Id:
b1f21346-6cbf-11e7-bb68-005056ad2203
I was building a WPF application in C# and packaging it using the MSIX packager/installer. Everything was fine until I updated Visual Studio to 16.10.2. Then something strange started to happen. The code would run perfectly in Debug and Release configuration but when I installed the application from MSIX it failed to run.
There were no coding errors.
The Event Log gave this error..
Faulting application name: [app name here], version: [app version here], time stamp: 0x609308e7
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1023, time stamp: 0x924f9cdb
Exception code: 0xe0434352
Fault offset: 0x0000000000034b89
Faulting process ID: 0xf3c
Faulting application start time: 0x01d7659e116b2c8c
I tried almost everything but nothing seem to fix it. Then I noticed the the 'obj' folder had become huge, so I deleted it and low and behold that fixed the problem.
I know this is old, but thought I'd post Luke's advice as an answer since it solved my problem.
As Luke mentioned in a comment above, the issue for me was an unhandled exception that was happening on startup. Once I wrapped the startup code in a try catch, I found the problem which was totally a bug in my app, nothing to do with kernalbase.dll or any other external dependency or reference.

Application crash with exit code 0xe0004743

My application crashed after running for some time.
I'm using .NET 4.6 on Windows Server 2012-R2.
Application is 64-bit.
I cannot find more detail about this bug code. I think I have all relevant updates installed.
This application has run cumulatively for thousands of hours before and this is the first time this particular bug happened.
Event viewer errors:
Faulting application name:ApplicationName, version: 1.0.0.0, time stamp: 0x561c9fd7
Faulting module name: clr.dll, version: 4.6.96.0, time stamp: 0x55b96716
Exception code: 0xe0004743
Fault offset: 0x00000000003ccf84
Faulting process id: 0xef4
Faulting application start time: 0x01d1058c3f5834e6
Faulting application path: ApplicationName
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 9765e800-7185-11e5-8177-0ae6116ba893
Second entry in the event viewer:
Application: ApplicationName
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FF837C2CF84 (00007FF837860000) with exit code e0004743.
The only similar issue reported in SO is The process was terminated due to an internal error in the .NET Runtime where GC issue / heap corruption was suggested.

Categories

Resources