初始化集合时 W3WP 崩溃

发布于 2024-09-04 01:34:30 字数 2926 浏览 0 评论 0原文

我创建了一个 ASP.NET MVC 应用程序,该应用程序具有附加到 PreApplicationStartMethodAttribute。初始化时,会实例化一个实现我定义的接口的集合。当我实例化此集合时,w3wp.exe 崩溃,并在事件日志中显示以下两个难以理解的条目:

Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
Faulting module name: clr.dll, version: 4.0.30319.1, time stamp: 0x4ba21eeb
Exception code: 0xc00000fd
Fault offset: 0x0000000000001177
Faulting process id: 0x1348
Faulting application start time: 0x01cb0224882f4723
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: c6a0941e-6e17-11df-864d-000acd16dcdb

并且:

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: w3wp.exe
P2: 7.5.7600.16385
P3: 4a5bd0eb
P4: clr.dll
P5: 4.0.30319.1
P6: 4ba21eeb
P7: c00000fd
P8: 0000000000001177
P9: 
P10: 

Attached files:

These files may be available here:


Analysis symbol: 
Rechecking for solution: 0
Report Id: c6a0941e-6e17-11df-864d-000acd16dcdb
Report Status: 0

如果我删除集合的实例化,应用程序将正常启动。如果我离开实例化,w3wp 就会崩溃。如果我修改界面,w3wp仍然崩溃。我已经尝试了我能想到的所有变体,主题是保持实例化,但以不同的方式做其他事情,但 w3wp 仍然崩溃。

我最大的问题是我完全不知道为什么 w3wp 崩溃。这不是 StackOverflowException 或任何类似的具体内容,我得到的只是上面引用的不智能的垃圾。

我尝试使用 DebugDiagIISState 来调试 w3wp 进程,但 DebugDiag 只能用于后期x64 中的转储分析(我在 Windows 7 x64 上运行,因此 w3wp 进程因此是 64 位),并且当我尝试运行它时 IISStat 会显示以下内容:

D:\Programs\iisstate>IISState.exe -p 9204 -d
Symbol search path is: SRV*D:\Programs\iisstate\symbols*http://msdl.microsoft.com/download/symbols

IISState is limited to processes associated with IIS.
If you require a generic debugger, please use WinDBG or CDB.
They are available for download from http://www.microsoft.com/ddk/debugging.
This error may also occur if a debugger is already attached to the process
being checked.

Incorrect Process Attachment

我已经仔细检查了 10 次我的进程 ID w3wp进程是正确的。我怀疑 IISState 也只能调试 x86 进程。在应用程序中的任何位置设置断点绝对没有任何作用。一旦请求从浏览器到达 IIS,断点不会被击中,w3wp 就会崩溃。在 Visual Studio 2010 中使用 F5 启动应用程序或启动另一个应用程序来启动并运行 w3wp 进程,然后将 VS2010 调试器附加到它,然后访问出错的应用程序没有帮助。

我还尝试添加 HTTP 模块,如 KB 中所述-911816 并将其添加到我的 web.config 文件中:

<configuration>
  <runtime>
    <legacyUnhandledExceptionPolicy enabled="true" />
  </runtime>
</configuration>

不用说,这绝对没有区别。所以我无法调试 w3wp 进程,无法从中提取任何信息并完成事件日志中的垃圾转储。如果有人知道如何调试这个问题,请告诉我!

I've created an ASP.NET MVC application that has an initializer attached to the PreApplicationStartMethodAttribute. When initializing, a collection is instantiated that implements an interface I've defined. When I instantiate this collection, w3wp.exe crashes with the following two incomprehensible entries in the event log:

Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
Faulting module name: clr.dll, version: 4.0.30319.1, time stamp: 0x4ba21eeb
Exception code: 0xc00000fd
Fault offset: 0x0000000000001177
Faulting process id: 0x1348
Faulting application start time: 0x01cb0224882f4723
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: c6a0941e-6e17-11df-864d-000acd16dcdb

And:

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: w3wp.exe
P2: 7.5.7600.16385
P3: 4a5bd0eb
P4: clr.dll
P5: 4.0.30319.1
P6: 4ba21eeb
P7: c00000fd
P8: 0000000000001177
P9: 
P10: 

Attached files:

These files may be available here:


Analysis symbol: 
Rechecking for solution: 0
Report Id: c6a0941e-6e17-11df-864d-000acd16dcdb
Report Status: 0

If I remove the instantiation of the collection, the application starts normally. If I leave the instantiation, w3wp crashes. If I modify the interface, w3wp still crashes. I've tried every variation I could come up with on the theme of keeping the instantiation but doing everything else differently, but w3wp still crashes.

My biggest issue here is that I have absolutely no idea why w3wp is crashing. It's not a StackOverflowException or anything concrete like that, all I get is the unintelligent junk cited above.

I've tried to use DebugDiag and IISState to debug the w3wp process, but DebugDiag is only available for post-dump analysis in x64 (I'm running on Windows 7 x64, so the w3wp process is thus 64 bit) and IISStat says the following when I try to run it:

D:\Programs\iisstate>IISState.exe -p 9204 -d
Symbol search path is: SRV*D:\Programs\iisstate\symbols*http://msdl.microsoft.com/download/symbols

IISState is limited to processes associated with IIS.
If you require a generic debugger, please use WinDBG or CDB.
They are available for download from http://www.microsoft.com/ddk/debugging.
This error may also occur if a debugger is already attached to the process
being checked.

Incorrect Process Attachment

I've double-checked 10 times that the process ID of my w3wp process is correct. I'm suspecting that IISState too only can debug x86 processes. Setting a breakpoint anywhere in the application does absolutely nothing. The break point isn't hit and w3wp crashes as soon as the request comes through to IIS from the browser. Starting the application with F5 in Visual Studio 2010 or starting another application to get the w3wp process up and running and then attaching the VS2010 debugger to it and then visiting the faulting application doesn't help.

I've also tried to add an HTTP module as described in KB-911816 as well as add this to my web.config file:

<configuration>
  <runtime>
    <legacyUnhandledExceptionPolicy enabled="true" />
  </runtime>
</configuration>

Needless to say, it makes absolutely no difference. So I'm left with no way to debug the w3wp process, no way to extract any information from it and complete garbage dumped in my event log. If anybody has any idea on how to debug this problem, please let me know!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水波映月 2024-09-11 01:34:30

我将回答我自己的问题只是为了结束,尽管我意识到这并不是解决可能导致 W3WP 崩溃的各种问题的唯一解决方案。

我的集合是基于 RouteTable.Routes 进行初始化的,它可能会引发异常(可能是因为在 ASP.NET 生命周期的早期阶段尚未对其自身进行初始化)。推迟与 RouteTable.Routes 的通信,直到稍后阶段解决该问题。

虽然这不是一个适合每个人的解决方案,但它对我有用,而且我发现这个问题是如此模糊,所以我将其留给任何人评论和回答,因为我发现没有关于这个问题的现有帖子任何地方,都可以为以后提供很好的参考。

I'll answer my own question just to get closure, although I realize it isn't the one and only solution to the variety of problems that might be causing W3WP to crash.

My collection was initialized based on RouteTable.Routes which might have thrown an exception (perhaps by not being initialized itself yet in such an early stage of the ASP.NET lifecycle). Postponing the communication with RouteTable.Routes until a later stage solved the problem.

While this isn't a solution that will work for everyone, it worked for me, and I find the problem to be so obscure that I'll leave it for anyone to comment on and answer, because I found no existing posts on this problem anywhere, so it might be of good reference in the future.

心的位置 2024-09-11 01:34:30

利用 Windows 最新调试工具中的 ADplus.exe 来捕获故障转储。然后转储分析应该显示导致崩溃的原因,

http://www.microsoft .com/whdc/devtools/debugging/default.mspx

http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en

版本 6.12.2.633 是必须的,因为它仅包含 adplus.exe 的工作副本(请注意,您不应使用 adplus.vbs)。

Utilize ADplus.exe in latest debugging tools for windows to capture crash dumps. Then dump analysis should show you what causes the crash,

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en

Version 6.12.2.633 is a must as only it contains a working copy of adplus.exe (note that you should not use adplus.vbs).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文