定期W3WP.exe崩溃

时间:2012-04-28 07:38:22

标签: dump crash-dumps w3wp.exe

我有ASP.NET应用程序。周期性地它会失败,让我的用户不高兴。

在日志中我看到:

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

在崩溃转储中,我看到:

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

这是正常的应用工作。 但在那之后呢?

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

结果我们有:

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

但我不会遇到什么麻烦。

请告诉我如何解决这个问题。

2 个答案:

答案 0 :(得分:0)

看起来类似:http://connect.microsoft.com/VisualStudio/feedback/details/665157/nlssorting-fault-crashes-iis

您也可以在尝试使用类似代码捕获Global.asax.cs的Application_Error()方法中的错误时找到价值:

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

随着时间的推移,你也可能会进入像How to get ELMAH to work with ASP.NET MVC [HandleError] attribute?

这样的解决方案

答案 1 :(得分:0)

根据Microsoft的文档w3wp.exe遇到未处理的异常时会崩溃。

根据我的经验w3wp.exe崩溃,当堆栈由于溢出而无可救药地损坏时,由于内存损坏,try-catch块无法处理这种错误。

主要原因可能是递归调用过多,因为每次调用都会使用一定量的堆栈直到退出。可能有无限递归?

第二个原因是w3wp.exe或.NET Framework中的内存管理不佳,导致内存损坏而不是检测到这种情况并通知用户Stack Overflow。