Windbg 无法加载 sos clr
我不确定 Windbg 是正确的工具,但这就是我现在正在尝试的,
我的 asp.net 应用程序似乎存在内存泄漏,几乎每次加载页面时它都会持续增长约 3 MB(然后它就消失了)退下来...)
我想读取整个进程内存并准确查看存储的内容是不必要的。
所以我运行windbg,附加到webserver40.exe进程
,然后我尝试
.loadby sos clr
并得到
The call to LoadLibrary(C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos) failed, Win32 error 0n193 “%1 不是有效的 Win32 应用程序。”
请检查您的调试器配置和/或网络访问。
看来我在 Framework 和 Framework64 中有这个 sos.dll
我尝试使用两者
.load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos
,但没有加载
我不明白为什么它在寻找有效的 32 位应用程序。我使用的是 64 位 Windows 的 64 位电脑。
我怎样才能加载这个 sos 东西?
另外,当我开始时,我收到此警告
警告:进程 7240 未作为调试对象附加 可以检查该进程,但不会收到调试事件
我也尝试了 loadby sos mscorwks
它不起作用,但我知道它已停止。我在 asp.net 4 中,
我还在某处读到,在加载 sos 之前应该在调试中停止代码,这只会挂起 VS 2010。
非常感谢。
再说一次,如果有其他工具可以更好地帮助我,我洗耳恭听:-)
I'm not sure that windbg is the right tool, but that's what I'm trying now
my asp.net app seems to have a memory leak, it keeps on growing by about 3 MB almost every time a page loads (then it goes back down...)
I want to read the entire process memory and see exactly whats being stored that is unnecessary.
So I run windbg, attach to the webserver40.exe process
then I try
.loadby sos clr
and I get
The call to LoadLibrary(C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos) failed, Win32 error 0n193
"%1 is not a valid Win32 application."
Please check your debugger configuration and/or network access.
It seems that I have this sos.dll in Framework AND Framework64
I tried both using
.load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos
but nothing loads
I don't understand why its looking for a vaild 32bit app. im on a 64bit pc with 64bit windows.
How can I get this sos thing to load?
Also when I start I get this warning
WARNING: Process 7240 is not attached as a debuggee
The process can be examined but debug events will not be received
I also tried loadby sos mscorwks
it didn't work, but I understand that was discontinued. I'm in asp.net 4
I also read somewhere that the code should be stopped in debug before loading sos, that just hangs VS 2010.
Thank you very much.
Again, if there's another tool that could better help me, I'm all ears :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WebDev.WebServer40.exe 是 32 位可执行文件。要调试,您需要使用 32 位 WinDbg。 Visual Studio 以及 Callipso 服务器仍以 32 位模式执行。
对于你的另一个问题。是的,WinDbg 是一个用于调查托管代码中内存泄漏的出色工具。 这个博客将帮助您入门。但就你而言,我不太确定你有内存泄漏。
WebDev.WebServer40.exe is a 32 bit executable. To debug that you need to use 32 bit WinDbg. Visual Studio, as well as Callipso server are still executing in 32 bit mode.
For your other question. Yes, WinDbg is a great tool to investigate memory leaks in managed code. This blog will get you started. However in your case I would not be so sure you have a memory leak.