Linux的Sosex替代方案.NET核心内存转储

发布于 2025-01-20 06:39:44 字数 578 浏览 1 评论 0原文

我正在尝试分析.NET Core Linux进程的10GB内存转储。我正在尝试使用dotnet转储分析命令,但是存在问题 - gcroot被卡住了几个小时,没有结果。

我习惯于使用windbg和sosex分析Windows .NET进程的内存转储。在这里,我们可以一次构建堆索引(bhi),并由其他命令使用,例如Ultra有用的refsmdt字符串命令。 Sosex非常有用,而且有效。在这里,对于Linux转储,我必须做错了什么,因为我无法获得gcroot工作。

有人成功地分析了10GB内存转储吗?我能够运行Dumpheap,但是如果没有引用感兴趣的对象,我不知道如何进行。通常,与使用Windbg + Sosex在Windows上使用WindBG + Sosex相比,Linux中的核心转储调试经验很糟糕。我一定做出了极大的错误。 Linux是否有Sosex替代方案?

PS 我不知道它是否重要,但是我正在使用WSL2,所以不是一个真正的Linux框。

I am trying to analyze a 10GB memory dump of a .NET Core linux process. I am trying to use the dotnet dump analyze command, but there is a problem - gcroot gets stuck for hours producing no result.

I am accustomed to analyzing memory dumps of the windows .Net processes using WinDBG and sosex. There we can build the heap index (bhi) once and it is used by other commands, like the ultra useful refs or mdt or strings commands. Sosex was exceptionally useful and it worked. Here with the linux dump I must be doing something wrong, because I am unable to get gcroot working.

Has anyone been successful in analyzing 10GB memory dumps? I am able to run dumpheap, but without references to the objects of interest I have no idea how to proceed. In general, I feel the core dump debugging experience in linux is abysmal when compared to that using WinDBG + sosex on windows. I must be doing something terribly wrong. Is there a sosex alternative for linux?

P.S.
I do not know if it matters, but I am using WSL2, so not a real Linux box.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

迷路的信 2025-01-27 06:39:44

GCRoot必须分析托管堆以查找指定对象的任何和所有引用。这是一个劳动密集型的过程,大型转储文件可能需要非常长时间。我认为Sosex已经更新了一段时间,可能无法使用。

gcroot has to analyze the managed heap to find any and all references to the object specified. It's a labor-intensive process and with large dump files can take a really, really long time. I don't think SOSEX has been updated for quite some time and likely will not work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文