首先我要说的是,这是我第一次使用 WinDbg 做任何事情,所以如果这是问题所在,请原谅我的愚蠢错误。我的网站一直使用大量内存,在阅读 Tess Fernandez 的博客和视频后,我尝试使用 WinDBG 来分析我的转储文件。
设置:我的 Web 服务器是一台 Windows 2008 64 位计算机,以 32 位兼容模式运行我的 asp.net 2.0 网站。我已经设置了一个环境变量来获取所有符号,因此在加载 WinDbg 时不会出现错误
我在 WinDbg 中使用以下命令:
.load C:\Windows\Microsoft.NET\Framework64\v2.0.50727\sos.dll
.load C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
!eeheap -gc
并收到以下错误:
垃圾收集器数据结构
不处于有效状态
遍历。它要么在“计划
阶段”,物体被移动
周围,或者我们在
GC 的初始化或关闭
堆。与显示相关的命令,
也可以查找或遍历对象
因为 gc 堆段可能不起作用
适当地。 !dumpheap 和 !verifyheap
可能会错误地抱怨堆
一致性错误。 GC次数
堆:1 请求详细信息时出错
我已阅读这可能是由某些版本不匹配引起的,我认为这可能是问题所在。为了走到这一步,我必须创建路径
C:\Windows\Symbols\mscordacwks_AMD64_x86_2.0.50727.4016.dll\49CC5B00590000\mscordacwks_AMD64_x86_2.0.50727.4016.dll
因此当我调用 !eeheap -gc 时会加载库(否则会出现其他一些错误)。问题是我从普通的 .NET 文件夹而不是 Framework64 文件夹中获取了 mscordacwks.dll。我不知道这是否是问题的原因,但我一直在用头撞砖墙,真的不知道还能做什么,所以我希望得到一些帮助。
非常感谢。
I will start by saying this is the first time I have done anything with WinDbg so excuse my silly mistakes if that is the issue. My website has been using a lot of memory and after reading blogs and watching videos by Tess Fernandez I am trying to use WinDBG to analyze my dump file.
The setup: My web server is a Windows 2008 64bit machine running my asp.net 2.0 website in 32 bit compatablity mode. I have set an environment variable to get all the symbols so I don't get errors when I load WinDbg
I am using the following commands in WinDbg:
.load C:\Windows\Microsoft.NET\Framework64\v2.0.50727\sos.dll
.load C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
!eeheap -gc
and getting the following error:
The garbage collector data structures
are not in a valid state for
traversal. It is either in the "plan
phase," where objects are being moved
around, or we are at the
initialization or shutdown of the gc
heap. Commands related to displaying,
finding or traversing objects as well
as gc heap segments may not work
properly. !dumpheap and !verifyheap
may incorrectly complain of heap
consistency errors. Number of GC
Heaps: 1 Error requesting details
I have read this can be caused by some version mismatch and I think that could be the issue. In order to get this far, I have had to create the path
C:\Windows\Symbols\mscordacwks_AMD64_x86_2.0.50727.4016.dll\49CC5B00590000\mscordacwks_AMD64_x86_2.0.50727.4016.dll
so the libraries are loaded when I call !eeheap -gc (otherwise some other errors come out). The problem is that I have taken this mscordacwks.dll from the normal .NET folder and not the Framework64 one. I don't know if this is the cause of the issue but I have been banging my head against a brick wall and don't really know what else to do so I would appreciate some help.
Many thanks.
发布评论
评论(2)
请查看这篇文章。另外,请确保您使用的调试器和 sos 的位数与转储的位数相同。 链接博客在帖子中 解释了这一点。因此,就您的情况而言,请使用 64 位 Windbg,从 Framework64 加载 sos.dll,并确保您的 mscordacwks 为“mscordacwks_amd64_amd64_2.0.50727.4016.dll”并且位于可访问的路径中。我喜欢将此程序集和匹配的 sos.dll 一起复制到它自己的文件夹中,但是 YMMV。
Take a look at this post. Also, make sure you're using the debugger and sos with the same bitness as the dump. The linked blog in the post explains this. So in your case, use the 64bit windbg, load the sos.dll from Framework64, and make sure your mscordacwks is "mscordacwks_amd64_amd64_2.0.50727.4016.dll" and is in a path that is accessible. I like to copy this assembly and the matching sos.dll into it's own folder together, but YMMV.
像 John Robbins 在他的精彩文章中解释的那样设置您的系统: https://www.wintellect.com/automatically-load-the-right-sos-for-the-minidump/
然后先执行
!analyze -v
。Set up your system like John Robbins explains in his great post: https://www.wintellect.com/automatically-load-the-right-sos-for-the-minidump/
Then execute an
!analyze -v
first.