Windbg 无法加载 sos clr

发布于 2024-12-03 00:48:43 字数 932 浏览 0 评论 0原文

我不确定 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心意如水 2024-12-10 00:48:43

WebDev.WebServer40.exe 是 32 位可执行文件。要调试,您需要使用 32 位 WinDbg。 Visual Studio 以及 Callipso 服务器仍以 32 位模式执行。

对于你的另一个问题。是的,WinDbg 是一个用于调查托管代码中内存泄漏的出色工具。 这个博客将帮助您入门。但就你而言,我不太确定你有内存泄漏。

  • 你是说记忆力最终会下降。这意味着这不是内存泄漏,因为泄漏的内存永远不会被释放。
  • 不要浪费时间研究 Callipso 中的内存问题。 IIS 和 Callipso 之间存在很多差异,这会使您的发现不适用于生产环境。即使您发现 Callipso 实际上存在泄漏,并不意味着 IIS 也会发生泄漏。

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.

  • You are saying that memory goes down eventually. This means it is not a memory leak, because a leaked memory never gets released.
  • Do not waste your time investigate memory problems in Callipso. There are a lot of differences between IIS and Callipso that would make your findings not applicable in production environment. Even if you find that Callipso is in fact leaking does not mean that IIS would be.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文