w3wp.exe 崩溃 - ThreadAbortException

发布于 2024-10-11 06:40:27 字数 4270 浏览 9 评论 0原文

我们遇到了一个无法重现的问题,它在运行 ASP.NET 4 的 Web 服务器(Windows Server 2008 Datacenter 64 位,托管在 Amazon EC2 上)上随机发生。

它以 ASP.NET 警告开始错误日志(一个奇怪的 GET 请求,带有很长的 URL):

异常信息:
异常类型:HttpException
异常消息:此请求的 URL 长度超出了配置的 maxUrlLength 值。
在 System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
在 System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext 上下文)

然后出现错误:

应用程序 ID:/LM/W3SVC/2/ROOT
进程ID:4604
异常:System.Threading.ThreadAbortException
消息:线程正在中止。
StackTrace:位于 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext 上下文)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr ManagedHttpContext、IntPtr nativeRequestContext、IntPtr moduleData、Int32 标志)
在System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr ManagedHttpContext,IntPtr nativeRequestContext,IntPtr moduleData,Int32标志)

然后另一个错误:

应用程序 ID:DefaultDomain
进程ID:4604
异常:System.Threading.ThreadAbortException
消息:线程正在中止。
堆栈跟踪:

然后是应用程序错误:

故障应用程序w3wp.exe,版本7.0.6002.18005,时间戳0x49e03238,故障模块kernel32.dll,版本6.0.6002.18005,时间戳0x49e041d1,异常代码0xe0434352,故障偏移0x00000000000176fd,进程ID 0x%9,应用程序启动时间0x%10。

Windbg

我设法获得了 adplus 崩溃的转储,但我真的不知道该寻找什么。我之前用Windbg解决过一些stackoverflows,但我不知道该使用哪种方法来解决这个错误。

!pe 出现错误的线程:

异常对象:00000001c323d948
异常类型:System.Threading.ThreadAbortException
消息:线程正在中止。
内部异常:
StackTrace(生成):

堆栈跟踪字符串:
HResult:80131530

!clrstack

子 SP IP 呼叫站点
0000000015f7f078 0000000076c176fd [GCFrame: 0000000015f7f078]
0000000015f7f258 0000000076c176fd [GCFrame:0000000015f7f258]

k

Child-SP RetAddr 调用站点
0000000015f7edf0 000007fef2826e39 kernel32!RaiseException+0x39
0000000015f7eec0 000007fef2bbbfb4 clr!RaiseTheExceptionInternalOnly+0x363
0000000015f7eff0 000007fef2bbc906 clr!RaiseTheException+0xa4
0000000015f7f020 000007fef2c3b99b clr!BStrFromString+0x66
0000000015f7f050 000007fef2c3b9a9 clr!RealCOMPlusThrow+0x3b
0000000015f7f0c0 000007fef2c93156 clr!RealCOMPlusThrow+0x9
0000000015f7f0f0 000007fef2b229f3 clr!Thread::RaiseCrossContextException+0x2a7
0000000015f7f310 000007fef2830886 clr! ?? ::FNODOBFM::字符串'+0xafb03
00000000
15f7f4c0 000007fef27fcce3 clr!UM2MDoADCallBack+0x9e
00000000
15f7f530 000007fef845ba59 clr!UMThunkStubAMD64+0x273
00000000
15f7f5c0 000007fef8458f02 webengine4!W3_MGD_HANDLER::ProcessNotification+0x79
00000000
15f7f5f0 000007fef27d4595 webengine4!ProcessNotificationCallback+0x43
00000000
15f7f620 000007fef27d3ac8 clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x181
00000000
15f7f6d0 000007fef294658f clr!ThreadpoolMgr::NewWorkerThreadStart+0x2e5
00000000
15f7f770 000007fef29447c6 clr!ThreadpoolMgr::WorkerThreadStart+0x3b
00000000
15f7f810 0000000076c1be3d clr!Thread::intermediateThreadProc+0x7d
00000000
15f7fbd0 0000000076d56a51 kernel32!BaseThreadInitThunk+0xd
00000000
15f7fc00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

有人知道这可能是什么吗?或者可以为我指明使用 Windbg 进行分析的正确方向吗?

编辑: 传入的 url 通常如下所示: foo.bar.com/wEPDwULLTE1MTk5MzIzMTFkGAMFFmN0bDAwJGRiMSRkZGxEYXRhYmFzZXMPFCsAAmRkZAU7Y3RsMDAkU2VhcmNoQ2xvdWQxJF9SaWdodENvbHVtbiRfU2VhcmNoQ2xvdWQkbHN2U2VhcmNoVGVybXMPFCsADmRkZGRkZGQ8KwAUAAIUZGRkZgL/D2QFK2N0bDAwJHN1cnZleTEkX1JpZ2h0Q29sdW1uJF9JUiR1c2VyQ29tbWVudHMPFCsAA2VnZGQeuUcvQDsShDIp1k7YjJw70Ry 9/Q1B9Sd1egrovYgkw==/

but I found in the event log that this happen for this urls like this aswell: foo.bar.com/& (.NET 4 中的“危险请求”)

we have a problem that we can't reproduce, it happens randomly on our web server (Windows Server 2008 Datacenter 64-bit, hosted on Amazon EC2) running ASP.NET 4.

It starts with a ASP.NET warning in the error log (a strange GET request with a really long URL):

Exception information:
Exception type: HttpException
Exception message: The length of the URL for this request exceeds the configured maxUrlLength value.
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

Then an error:

Application ID: /LM/W3SVC/2/ROOT
Process ID: 4604
Exception: System.Threading.ThreadAbortException
Message: Thread was being aborted.
StackTrace: at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Then another error:

Application ID: DefaultDomain
Process ID: 4604
Exception: System.Threading.ThreadAbortException
Message: Thread was being aborted.
StackTrace:

And then the application error:

Faulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e03238, faulting module kernel32.dll, version 6.0.6002.18005, time stamp 0x49e041d1, exception code 0xe0434352, fault offset 0x00000000000176fd, process id 0x%9, application start time 0x%10.

Windbg

I managed to get a dump for a crash with adplus, but I really don't know what to look for. I've troubleshooted some stackoverflows with Windbg before, but I don't know which approach to use for this error.

!pe on the thread with the error:

Exception object: 00000001c323d948
Exception type: System.Threading.ThreadAbortException
Message: Thread was being aborted.
InnerException:
StackTrace (generated):

StackTraceString:
HResult: 80131530

!clrstack

Child SP IP Call Site
0000000015f7f078 0000000076c176fd [GCFrame: 0000000015f7f078]
0000000015f7f258 0000000076c176fd [GCFrame: 0000000015f7f258]

k

Child-SP RetAddr Call Site
0000000015f7edf0 000007fef2826e39 kernel32!RaiseException+0x39
0000000015f7eec0 000007fef2bbbfb4 clr!RaiseTheExceptionInternalOnly+0x363
0000000015f7eff0 000007fef2bbc906 clr!RaiseTheException+0xa4
0000000015f7f020 000007fef2c3b99b clr!BStrFromString+0x66
0000000015f7f050 000007fef2c3b9a9 clr!RealCOMPlusThrow+0x3b
0000000015f7f0c0 000007fef2c93156 clr!RealCOMPlusThrow+0x9
0000000015f7f0f0 000007fef2b229f3 clr!Thread::RaiseCrossContextException+0x2a7
0000000015f7f310 000007fef2830886 clr! ?? ::FNODOBFM::string'+0xafb03
00000000
15f7f4c0 000007fef27fcce3 clr!UM2MDoADCallBack+0x9e
00000000
15f7f530 000007fef845ba59 clr!UMThunkStubAMD64+0x273
00000000
15f7f5c0 000007fef8458f02 webengine4!W3_MGD_HANDLER::ProcessNotification+0x79
00000000
15f7f5f0 000007fef27d4595 webengine4!ProcessNotificationCallback+0x43
00000000
15f7f620 000007fef27d3ac8 clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x181
00000000
15f7f6d0 000007fef294658f clr!ThreadpoolMgr::NewWorkerThreadStart+0x2e5
00000000
15f7f770 000007fef29447c6 clr!ThreadpoolMgr::WorkerThreadStart+0x3b
00000000
15f7f810 0000000076c1be3d clr!Thread::intermediateThreadProc+0x7d
00000000
15f7fbd0 0000000076d56a51 kernel32!BaseThreadInitThunk+0xd
00000000
15f7fc00 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

Anybody have a clue what this could be? Or can point me in the right direction for analyzing it with Windbg?

Edit:
The incoming urls usually looks like this:
foo.bar.com/wEPDwULLTE1MTk5MzIzMTFkGAMFFmN0bDAwJGRiMSRkZGxEYXRhYmFzZXMPFCsAAmRkZAU7Y3RsMDAkU2VhcmNoQ2xvdWQxJF9SaWdodENvbHVtbiRfU2VhcmNoQ2xvdWQkbHN2U2VhcmNoVGVybXMPFCsADmRkZGRkZGQ8KwAUAAIUZGRkZgL/D2QFK2N0bDAwJHN1cnZleTEkX1JpZ2h0Q29sdW1uJF9JUiR1c2VyQ29tbWVudHMPFCsAA2VnZGQeuUcvQDsShDIp1k7YjJw70Ry 9/Q1B9Sd1egrovYgkw==/

but I found in the event log that this happen for this urls like this aswell:
foo.bar.com/&
("dangerous request" in .NET 4)

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

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

发布评论

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

评论(2

蹲在坟头点根烟 2024-10-18 06:40:27

您至少应该加载符号,然后看到调用堆栈中显示的正确字符串。

如果您无法处理此类分析,我认为通过 http://support.microsoft.com 对你有好处。

You should at least load symbols and then see the correct strings displayed in call stack.

If you are not capable of handling such analysis, I think opening a support case via http://support.microsoft.com is good for you.

双马尾 2024-10-18 06:40:27

我一直在尝试解决类似的问题。

我发现这篇文章声称有一个确定原因的过程,我认为它实际上是有道理的:

http://blogs.msdn.com/b/asiatech/archive/2012/06 /21/how-to-troubleshoot-httpexception-request-timed-out-asp-net-4-0-64-bit.aspx

警告:我无法成功完成所描述的步骤。我将在这里发帖寻求帮助。

I have been trying to work out a similar issue.

I found this article which purports a process for determining the cause, I think it actually makes sense:

http://blogs.msdn.com/b/asiatech/archive/2012/06/21/how-to-troubleshoot-httpexception-request-timed-out-asp-net-4-0-64-bit.aspx

Caveat: I have not been able to sucessfully complete the steps described. I will be posting here asking for help.

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