2010-08-12 23 views
1

我會首先說這是我第一次使用WinDbg做任何事情,所以如果這是問題,請原諒我的愚蠢錯誤。我的網站一直在使用大量的內存,在閱讀博客和觀看Tess Fernandez的視頻後,我正在嘗試使用WinDBG來分析我的轉儲文件。使用WinDBG分析.dmp時遇到問題

設置:我的網絡服務器是一個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 

,並得到以下錯誤:

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

我讀過這可以導致一些版本不匹配,我認爲這可能是問題。爲了遠得到這個,我不得不創建路徑

C:\Windows\Symbols\mscordacwks_AMD64_x86_2.0.50727.4016.dll\49CC5B00590000\mscordacwks_AMD64_x86_2.0.50727.4016.dll

所以當我叫庫被加載!eeheap-GC(另有一些其他錯誤出來)。問題是我從正常的.NET文件夾中取得了mscordacwks.dll,而不是Framework64。我不知道這是否是造成這個問題的原因,但我一直在撞牆,並且不知道還有什麼可以做,所以我希望得到一些幫助。

非常感謝。

回答

1

看看this的帖子。另外,確保你使用的調試器和sos的轉儲位數相同。 post中的linked blog解釋了這一點。所以在你的情況下,使用64位windbg,從Framework64加載sos.dll,並確保你的mscordacwks是「mscordacwks_amd64_amd64_2.0.50727.4016.dll」,並且位於可訪問的路徑中。我喜歡將這個程序集和匹配的sos.dll複製到它自己的文件夾中,但是YMMV。

+0

我認爲這回答我需要知道的。謝謝。 – webnoob 2010-08-24 15:05:24