Question

I have ASP.NET application. Periodicaly it is down and make my users unhappy.

In log I see:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: nlssorting.dll, version: 4.0.30319.261, time stamp: 0x4ec9f3aa
Exception code: 0xc00000fd
Fault offset: 0x0000000000002296
Faulting process id: 0xfe4
Faulting application start time: 0x01cd23bb335b5514
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
Report Id: f25aaeba-8fae-11e1-aeea-0030488d6555

In crash dumps I see:

00000000`18187760 00000000`ffffffff app_code!FunBeatRace.Configuration.SiteConfiguration.get_CurrentBrand+0x5a
00000000`181877a0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.CreateResourceKeyFromCultureName+0x16
00000000`181877f0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.GetResourceCache+0x78
00000000`181878c0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.System.Web.Compilation.IResourceProvider.GetObject+0x9b
00000000`18187900 00000000`ffffffff system_web_ni!System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject+0x1f
00000000`18187940 00000000`ffffffff system_web_ni!System.Web.HttpContext.GetGlobalResourceObject+0x27

this is normal application work. But after that happening

000000001819D600 000007FF001E116B App_Code!FunBeatRace.Configuration.SiteConfiguration.get_CurrentBrand()+0x1cb
000000001819D640 000007FF001E2F06 App_Code!FunBeatRace.Globalization.CustomResourceProvider.CreateResourceKeyFromCultureName(System.String)+0x16
000000001819D690 000007FF001E29E8 App_Code!FunBeatRace.Globalization.CustomResourceProvider.GetResourceCache(System.String)+0x78

MANAGED_STACK_COMMAND:  _EFN_StackTrace

LAST_CONTROL_TRANSFER:  from 000007fef99c3742 to 000007fef80b2296

ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

FAULTING_THREAD:  ffffffffffffffff

BUGCHECK_STR:  APPLICATION_FAULT_STACK_OVERFLOW_WRONG_SYMBOLS_CALL

PRIMARY_PROBLEM_CLASS:  STACK_OVERFLOW_CALL

DEFAULT_BUCKET_ID:  STACK_OVERFLOW_CALL

STACK_TEXT:  
00000000`18187530 00000000`ffffffff mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke+0xbe
00000000`18187620 00000000`ffffffff mscorlib_ni!System.Globalization.CompareInfo.GetHashCodeOfString+0xa9
00000000`18187670 00000000`ffffffff mscorlib_ni!System.Collections.Hashtable.get_Item+0x5c
00000000`18187720 00000000`ffffffff system_web_ni!System.Web.SessionState.SessionStateItemCollection.get_Item+0x32

In result we have:

SYMBOL_NAME:  mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: mscorlib_ni

IMAGE_NAME:  mscorlib.ni.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  4ec9f74e

STACK_COMMAND:  _EFN_StackTrace ; ** Pseudo Context ** ; kb

FAILURE_BUCKET_ID:  STACK_OVERFLOW_CALL_c00000fd_mscorlib.ni.dll!DomainNeutralILStubClass.IL_STUB_PInvoke

BUCKET_ID:  X64_APPLICATION_FAULT_STACK_OVERFLOW_WRONG_SYMBOLS_CALL_mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7601_17514/4ce7afa2/nlssorting_dll/4_0_30319_261/4ec9f3aa/c00000fd/00002296.htm?Retriage=1

Followup: MachineOwner

But I dont undertand in what trouble.

Please advice me how I can resolve this issue.

No correct solution

OTHER TIPS

This looks similar: http://connect.microsoft.com/VisualStudio/feedback/details/665157/nlssorting-fault-crashes-iis

You may also find value in trying to catch errors in Global.asax.cs's Application_Error() method with code like so:

protected void Application_Error(Object sender, EventArgs e) {
    Exception ex = HttpContext.Current.Server.GetLastError();
    // handle it
    HttpContext.Current.Context.ClearError();
}

In time you may also ramp up into a solution like How to get ELMAH to work with ASP.NET MVC [HandleError] attribute?

According to Microsoft's documentation w3wp.exe crashes sometimes when encounters an unhandled exception.

According to my experience w3wp.exe crashes when stack gets hopelessly corrupted due to overflow, and this kind of error can not be handled by try-catch block because of memory corruption.

The primary reason could be too many recursive calls, because each call uses some amount of stack until exited. May be there is an infinite recursion?

The second reason is poor memory management in w3wp.exe or in .NET Framework that allows memory corruption to happen instead of detecting this situation and informing user about Stack Overflow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top