dumpheap 时提示:

0:105> !dumpheap -stat
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.
Error requesting GC Heap data
Unable to build snapshot of the garbage collector state

这种情况大部分是由于sos版本不匹配导致:

0:105> .cordll –ve –u –l

CLRDLL: Loaded DLL C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll
CLR DLL status: Loaded DLL C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll

.cordll –ve –u –l (小写的L ) 这个命令是控制调试和控制CLR的命令,-ve是显示详细信息,-u 卸载模块,-l (小写的L) 是加载模块,上面这个命令就是卸载CLR 调试模块,然后再加载CLR调试模块,并显示详细信息

貌似已经加载正确,此时,重新运行dumpheap,错误仍然存在。

0:105> .chain
Extension DLL search Path:
    D:\windbg\WINXP;D:\windbg\winext;D:\windbg\winext\arcade;D:\windbg\pri;D:\windbg;D:\windbg\winext\arcade;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\7-Zip;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Java\jdk1.6.0_25\bin;D:\Program Files\Java\jdk1.6.0_25\JRE\bin
Extension DLL chain:
    sosex: image 4.5.0.0, API 1.0.0, built Wed Oct 03 22:57:55 2012
        [path: D:\windbg\sosex.dll]
 
   sos: image 4.0.30319.18408, API 1.0.0, built Thu Sep 06 14:07:11 2012
        [path: D:\windbg\sos.dll]
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos: image 4.0.30319.18408, API 1.0.0, built Thu Sep 12 08:02:43 2013
        [path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll]
    dbghelp: image 6.13.0001.776, API 6.1.6, built Sat May 15 04:57:22 2010
        [path: D:\windbg\dbghelp.dll]
    ext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:40 2010
        [path: D:\windbg\winext\ext.dll]
    exts: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:13 2010
        [path: D:\windbg\WINXP\exts.dll]
    uext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:09 2010
        [path: D:\windbg\winext\uext.dll]
    ntsdexts: image 6.1.7752.0, API 1.0.0, built Sat May 15 04:52:37 2010
        [path: D:\windbg\WINXP\ntsdexts.dll]

貌似加载了两个sos.dll

0:105> .unload sos
Unloading sos extension DLL
0:105> .chain
Extension DLL search Path:
    D:\windbg\WINXP;D:\windbg\winext;D:\windbg\winext\arcade;D:\windbg\pri;D:\windbg;D:\windbg\winext\arcade;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\7-Zip;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Java\jdk1.6.0_25\bin;D:\Program Files\Java\jdk1.6.0_25\JRE\bin
Extension DLL chain:
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos: image 4.0.30319.18408, API 1.0.0, built Thu Sep 12 08:02:43 2013
        [path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll]
    dbghelp: image 6.13.0001.776, API 6.1.6, built Sat May 15 04:57:22 2010
        [path: D:\windbg\dbghelp.dll]
    ext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:40 2010
        [path: D:\windbg\winext\ext.dll]
    exts: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:13 2010
        [path: D:\windbg\WINXP\exts.dll]
    uext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:09 2010
        [path: D:\windbg\winext\uext.dll]
    ntsdexts: image 6.1.7752.0, API 1.0.0, built Sat May 15 04:52:37 2010
        [path: D:\windbg\WINXP\ntsdexts.dll]

此时,只有一个sos了,在运行dumpheap试试:

0:105> !dumpheap -stat
Statistics:
              MT    Count    TotalSize Class Name
000007fef29fd978        1           24 System.Xml.Linq.XHashtable`1[[System.WeakReference, mscorlib]]
000007fef29fd880        1           24 System.Xml.Linq.XHashtable`1[[System.Xml.Linq.XName, System.Xml.Linq]]

推荐隔椅同事的文章,列举了各种可能:

http://www.cnblogs.com/softfair/p/The_version_SOS_not_match_version_of_CLR_PDB_symbol_for_clr_dll_not_loaded.html

SRV*c:\mysymbol* http://msdl.microsoft.com/download/symbols

windbg sos版本不匹配问题解决的更多相关文章

  1. Windbg SOS 加载技巧(.net framwork 2.0)

    1.打开windbg,加载dump.使用命令确定dump的clr版本:lm vm mscorwks 或者lm vm clr(!eeversion可以查看加载后的sos版本) 2.找到对应的mscorw ...

  2. WinDbg 命令三部曲:(二)WinDbg SOS 扩展命令手册

    本文为 Dennis Gao 原创技术文章,发表于博客园博客,未经作者本人允许禁止任何形式的转载. 系列博文 <WinDbg 命令三部曲:(一)WinDbg 命令手册> <WinDb ...

  3. 用windbg+sos找出程序中谁占用内存过高,谁占用CPU过高(转载)

    原文地址: http://www.cnblogs.com/Lawson/archive/2011/01/23/1942692.html 很早看到windbg+sos方面的知识,一直没仔细学习,也许因为 ...

  4. Django2.2使用mysql数据库pymysql版本不匹配问题的解决过程与总结

    前置条件 django版本:2.2.1 python版本:3.6.6 mysql版本:mysql-community8.0.15 问题 在搭建django项目,配置mysql数据库时遇到无法迁移数据库 ...

  5. python的tkinter版本不匹配问题:RuntimeError: test:tk.h version (8.4) doesn't match libtk.a version (8.5)

    Traceback (most recent call last): File "/root/CodeWorkPace/test/TCPClient.py", line 20, i ...

  6. spring boot 2.0.0由于版本不匹配导致的NoSuchMethodError问题解析

    spring boot升级到2.0.0以后,项目突然报出 NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBu ...

  7. react和redux版本不匹配

    1.页面报错Cannot read property 'shape' of undefined 2. 原因为:react版本与react-redux版本不匹配. 1.package.json文件修改该 ...

  8. org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout() mybatis和spring-mybatis版本不匹配问题

    java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()  ...

  9. 注意JDBC驱动的版本和JDK的版本是否匹配 JDBC连接Mariadb

    Java利用JDBC连接Mariadb的过程和MySQL基本一致. 但是需要注意JDBC驱动的版本和JDK的版本是否匹配: JDBC和JDK版本对应关系 JDBC版本 JDK版本 2.x 1.8 1. ...

随机推荐

  1. DFS HDOJ 2181 哈密顿绕行世界问题

    题目传送门 题意:中文题面 分析:直接排完序后DFS.这样的题以后不应该再写题解的. #include <bits/stdc++.h> using namespace std; vecto ...

  2. HDU 5087 (线性DP+次大LIS)

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5087 题目大意:求次大LIS的长度.注意两个长度相同的LIS大小比较,下标和大的LIS较大. 解题思 ...

  3. maven工程代码关联源代码配置

    最近在学习dubbo,在maven构建完成后,需要关联查看一些依赖jar的源码,配置很简单,如下: 勾选windows-Preferences-Maven- Download Artifact Sou ...

  4. FireFox火狐浏览器与IE兼容问题 - 透明滤镜 DIV滚动条

    问题一:最简单的鼠标移过手变型的css要改了 cursor:pointer;/*FireFox(火狐)不支持cursor:hand*/ dw8下面自动出来的也没有hand这个属性了,标准的是point ...

  5. (转)微信公众平台开发之基于百度 BAE3.0 的开发环境搭建(采用 Baidu Eclipse)

    原文传送门(http://blog.csdn.net/bingtianxuelong/article/details/17843111) 版本说明:     V1:         2014-2-13 ...

  6. PCL 1.4.0 VS 2010 Configuration

    Open VS2010, create a new project, then open Property Manager, double-click Microsoft.Cpp.win32.user ...

  7. HTML&CSS布局练习---360导航页面

    一共分为7个部分:由HTML和CSS外部样式表做成 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...

  8. YII 查找View的5种方式

    别名开头,路径指定view文件@app/views/site/about.php //开头,使用 app目录下面的views//site/about.php /开头,使用当前Module中的views ...

  9. 【转载】jQuery插件开发精品教程,让你的jQuery提升一个台阶

    要说jQuery 最成功的地方,我认为是它的可扩展性吸引了众多开发者为其开发插件,从而建立起了一个生态系统.这好比大公司们争相做平台一样,得平台者得天下.苹果,微软,谷歌等巨头,都有各自的平台及生态圈 ...

  10. Setting property 'source' to 'org.eclipse.jst.jee.server

    警告: [SetPropertiesRule] Setting property 'source' to 'org.eclipse.jst.jee.server:project' did not fi ...