asp.net – 如何找到ThreadPool工作线程正在做什么?
发布时间:2020-12-16 09:48:25 所属栏目:asp.Net 来源:网络整理
导读:我在w3wp.exe中拥有100%的CPU利用率,CPU的前3个线程如下所示 当我切换到其中一个有问题的线程时(例如18)我在尝试走动callstack时会得到以下错误,所以我认为它只是非托管代码而且“k”和“dumpstack”也在下面 所以我的问题是如何找出在这些Theadpool工作线
我在w3wp.exe中拥有100%的CPU利用率,CPU的前3个线程如下所示
当我切换到其中一个有问题的线程时(例如18)我在尝试走动callstack时会得到以下错误,所以我认为它只是非托管代码而且“k”和“dumpstack”也在下面 所以我的问题是如何找出在这些Theadpool工作线程上占用所有CPU的内容? 0:018> !runaway User Mode Time Thread Time 15:12a4 0 days 0:13:15.359 18:830 0 days 0:10:49.046 17:1084 0 days 0:10:47.343 12:fc 0 days 0:00:36.828 ... 0:018> !threadpool CPU utilization 100% Worker Thread: Total: 3 Running: 0 Idle: 3 MaxLimit: 100 MinLimit: 1 Work Request in Queue: 6 -------------------------------------- Number of Timers: 8 -------------------------------------- Completion Port Thread:Total: 1 Free: 1 MaxFree: 2 CurrentLimit: 0 MaxLimit: 100 MinLimit: 1 0:018> !threads ThreadCount: 10 UnstartedThread: 0 BackgroundThread: 10 PendingThread: 0 DeadThread: 0 Hosted Runtime: no PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception 7 1 1078 016eced8 8220 Enabled 00000000:00000000 016e84d0 0 Ukn 12 2 fc 016fb0c8 b220 Enabled 00000000:00000000 016e84d0 0 MTA (Finalizer) 10 3 1148 01717b60 880a220 Enabled 00000000:00000000 016e84d0 0 MTA (Threadpool Completion Port) 13 4 680 0171dad8 80a220 Enabled 00000000:00000000 016e84d0 0 MTA (Threadpool Completion Port) 14 5 9b8 0171e470 1220 Enabled 00000000:00000000 016e84d0 0 Ukn 15 6 12a4 017629f0 180b220 Enabled 00000000:00000000 016e84d0 0 MTA (Threadpool Worker) 3 7 1188 016ef888 220 Enabled 00000000:00000000 016e84d0 0 Ukn 17 8 1084 003085e8 180b220 Enabled 00000000:00000000 016e84d0 0 MTA (Threadpool Worker) 18 9 830 03e433b8 180b220 Enabled 00000000:00000000 016e84d0 0 MTA (Threadpool Worker) 19 a f3c 03e79448 220 Enabled 00000000:00000000 016e84d0 0 Ukn 0:018> !clrstack OS Thread Id: 0x830 (18) Failed to start stack walk: 80004005 0:018> k ChildEBP RetAddr 077ef7a4 76630a91 ntdll!ZwWaitForSingleObject+0x15 077ef810 75711194 KERNELBASE!WaitForSingleObjectEx+0x98 077ef828 6ec25497 kernel32!WaitForSingleObjectExImplementation+0x75 077ef86c 6ec253e3 mscorwks!PEImage::LoadImage+0x1af 077ef8bc 6ec25402 mscorwks!CLREvent::WaitEx+0x117 077ef8d0 6ec8b75f mscorwks!CLREvent::Wait+0x17 077ef950 6ec8bbed mscorwks!ThreadpoolMgr::SafeWait+0x73 077ef9b4 6ed8305a mscorwks!ThreadpoolMgr::WorkerThreadStart+0x11c 077efc58 7571339a mscorwks!Thread::intermediateThreadProc+0x49 077efc64 77559ef2 kernel32!BaseThreadInitThunk+0xe 077efca4 77559ec5 ntdll!__RtlUserThreadStart+0x70 077efcbc 00000000 ntdll!_RtlUserThreadStart+0x1b 0:018> !dumpstack OS Thread Id: 0x830 (18) Current frame: ntdll!ZwWaitForSingleObject+0x15 ChildEBP RetAddr Caller,Callee 077ef7a4 76630a91 KERNELBASE!WaitForSingleObjectEx+0x98,calling ntdll!ZwWaitForSingleObject 077ef810 75711194 kernel32!WaitForSingleObjectExImplementation+0x75,calling KERNELBASE!WaitForSingleObjectEx 077ef828 6ec25497 mscorwks!PEImage::LoadImage+0x1af 077ef854 6eea07a9 mscorwks!UM2MDoADCallBack+0x98,calling mscorwks!_EH_epilog3 077ef86c 6ec253e3 mscorwks!CLREvent::WaitEx+0x117,calling mscorwks!PEImage::LoadImage+0x180 077ef89c 6ec243ea mscorwks!UnsafeEELeaveCriticalSection+0x25,calling mscorwks!DECTHREADNONHOSTLOCKCOUNT 077ef8a8 6ec243ab mscorwks!CrstBase::Leave+0x8c,calling mscorwks!UnsafeEELeaveCriticalSection 077ef8bc 6ec25402 mscorwks!CLREvent::Wait+0x17,calling mscorwks!CLREvent::WaitEx 077ef8d0 6ec8b75f mscorwks!ThreadpoolMgr::SafeWait+0x73,calling mscorwks!CLREvent::Wait 077ef8f8 6ec2d529 mscorwks!GCHolder<1,1>::GCHolder<1,1>+0x29,calling mscorwks!Thread::DisablePreemptiveGC 077ef900 6ec299cc mscorwks!Thread::EnablePreemptiveGC+0xf,calling mscorwks!Thread::CatchAtSafePoint 077ef950 6ec8bbed mscorwks!ThreadpoolMgr::WorkerThreadStart+0x11c,calling mscorwks!ThreadpoolMgr::SafeWait 077ef9b4 6ed8305a mscorwks!Thread::intermediateThreadProc+0x49 077ef9d0 77559e83 ntdll!LdrInitializeThunk+0x1a,calling ntdll!NtContinue 077efc44 6ed83048 mscorwks!Thread::intermediateThreadProc+0x37,calling mscorwks!_alloca_probe_16 077efc58 7571339a kernel32!BaseThreadInitThunk+0xe 077efc64 77559ef2 ntdll!__RtlUserThreadStart+0x70 077efca4 77559ec5 ntdll!_RtlUserThreadStart+0x1b,calling ntdll!__RtlUserThreadStart 解决方法
是的,这是非托管代码.
尝试分析您的代码,以确定代码的哪个部分正在吸收CPU.有一些免费的代码分析器,请查看此主题: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在文本框中插入日期,然后在日历asp.net中选择该日期c#
- asp.net-mvc – 为什么不在View中使用Linq
- asp.net-identity – ASP.net身份 – UserManager如何访问角
- ASP.NET CSS CSS语法问题中的类与CSSClass的区别
- asp.net – 带有自定义数据的web api帖子图片
- asp.net-mvc-4 – 重定向到动作,参数在mvc中始终为空
- asp.net – 成员资格生成密码仅字母数字密码?
- ninject – 为从ASP.NET MVC和工作者应用程序使用RabbitMQ设
- asp.net-mvc – 只发布控制器
- 如何使用枚举的组合值
推荐文章
站长推荐
- asp.net-mvc-4 – 自定义错误在我的MVC 4应用程序
- asp.net-mvc – DropDownList设置在asp.net MVC中
- asp.net-mvc – 在ASP.NET MVC中使用线程设置当前
- asp.net-mvc-3 – MVC视图的命名空间问题 – Raz
- asp.net – 实现安全的“记住我”的最佳实践
- asp.net-mvc – ASP.NET MVC:如何处理View中的N
- asp.net-mvc-2 – 在ASP.NET MVC2中向客户端返回
- asp.net – IIS 7.0不允许下载MP4视频
- 从ASP.NET中的web.sitemap文件构建菜单
- asp.net – 在Web应用程序项目中使用codefile
热点阅读