Chr*_*ine 7 debugging performance symbols windbg hang
在使用WinDbg调试故障转储时,我花了几天时间尝试加速符号加载,我无法解决特定问题.
问题是,当转储中的模块的符号在任何可访问的符号存储或符号服务器位置中不存在时(例如,它是没有可用符号的第三方模块),WinDbg将花费数小时来查找它们.
我已正确设置我的符号路径以正确设置搜索顺序和缓存目录:
.sympath cache*C:\SymbolCache1;\\our.corp\SymbolStore;SRV*C:\SymbolCache2*http://msdl.microsoft.com/download/symbols
Run Code Online (Sandbox Code Playgroud)
与运行!sym noisy和.reload /f我可以看到:
SYMSRV: Notifies the client application that a proxy has been detected.
SYMSRV: Connecting to the Server: http://msdl.microsoft.com/download/symbols.
SYMSRV: Successfully connected to the Server.
SYMSRV: Sending the information request to the server.
SYMSRV: Successfully sent the information request to the server.
SYMSRV: Waiting for the server to respond to a request.
SYMSRV: Successfully received a response from the server.
SYMSRV: Closing the connection to the Server.
SYMSRV: Successfully closed the connection to the Server.
SYMSRV: c:\SymbolCache1\Some3rdParty.dll\0060D200cd1000\Some3rdParty.dll not found
SYMSRV: c:\SymbolCache2\Some3rdParty.dll\0060D200cd1000\Some3rdParty.dll not found
SYMSRV: http://msdl.microsoft.com/download/symbols/Some3rdParty.dll/0060D200cd1000/Some3rdParty.dll not found
<---- !!!! hanging here with *BUSY* showing in WinDbg
Run Code Online (Sandbox Code Playgroud)
通过在挂起的位置运行Process Monitor,我可以看到WinDbg正在搜索我们的巨型网络符号存储(\ our.corp\SymbolStore)中的每个目录,寻找符号,即使在模块的目录中也是如此.显然无关.
奇怪的是,在WinDbg中,您可以看到它提取了模块的时间戳(0060D200cd1000),并使用它来查看本地目录和MS符号服务器中的预期位置.我无法弄清楚它为什么要对我们的(大型)网络符号存储进行全面扫描.也许它对待UNC路径有什么独特之处?
此搜索每个符号可能需要15分钟或更长时间,如果转储有许多缺少的符号,这可能会导致!analyze -v花费数小时(如果您使用WinDbg的Visual Studio集成,则会在加载后立即发生挂起崩溃转储,因为出于某种原因,尽管.symopt设置集成尝试立即加载所有符号).
如果您尝试为不存在的虚构模块名称加载符号,例如,此问题也很容易重现.reload /f bogus.dll.
这是我的WinDbg .symopt设置:
0:000> .symopt
Symbol options are 0x30337:
0x00000001 - SYMOPT_CASE_INSENSITIVE
0x00000002 - SYMOPT_UNDNAME
0x00000004 - SYMOPT_DEFERRED_LOADS
0x00000010 - SYMOPT_LOAD_LINES
0x00000020 - SYMOPT_OMAP_FIND_NEAREST
0x00000100 - SYMOPT_NO_UNQUALIFIED_LOADS
0x00000200 - SYMOPT_FAIL_CRITICAL_ERRORS
0x00010000 - SYMOPT_AUTO_PUBLICS
0x00020000 - SYMOPT_NO_IMAGE_SEARCH
Run Code Online (Sandbox Code Playgroud)
我一直在想,必须有一些旗帜来控制它,但我似乎无法找到它.
几件事:
sympath命令验证了我的符号路径是我所期望的.我也尝试过使用_NT_SYMBOL_PATH环境变量.Bru*_*son 13
不应该是:
.sympath cache*C:\SymbolCache1;SRV*\\our.corp\SymbolStore;SRV*C:\SymbolCache2*http://msdl.microsoft.com/download/symbols
Run Code Online (Sandbox Code Playgroud)
也就是说,通过列表\\our.corp\SymbolStore而不是SRV*你告诉dbghelp在这个非结构化目录中查找符号.如果您使用SRV*语法,那么您告诉dbghelp让symsrv以非常具体和结构化的方式查看该目录.
symsrv.dll可以有效地搜索Microsoft的符号服务器,如果您告诉它,它可以有效地搜索您的符号服务器SRV*.
| 归档时间: |
|
| 查看次数: |
1928 次 |
| 最近记录: |