调试Mac的Chrome CrashPad崩溃报告

发布于 2025-01-27 14:27:02 字数 2145 浏览 6 评论 0 原文

我的应用程序以某种方式设法将客户的铬浏览器撞倒在Mac上。我要求客户启用崩溃报告,并下次发生转储文件。我得到了一个 crashpad.zip 文件,其中包含一堆.dmp文件。我想每个文件都代表一个镀铬选项卡的过程。尝试使用Visual Studio或WindBG打开这些垃圾场行不通。请注意,转储文件是在Mac上捕获的,我正在Windows上工作。

当尝试看到 〜K 的呼叫堆栈时,我会得到输出:

0:000> ~k
 # Child-SP          RetAddr               Call Site
00 00000001`6ee35960 00000000`00000000     Google_Chrome_Framework+0x4486b50

尝试从Chromium Symbol Server加载符号时,我会得到:

0:000> .sympath+ SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
Symbol search path is: srv*;https://chromium-browser-symsrv.commondatastorage.googleapis.com;SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
Expanded Symbol search path is: cache*;SRV*https://msdl.microsoft.com/download/symbols;https://chromium-browser-symsrv.commondatastorage.googleapis.com;srv\*c:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Deferred                                       https://chromium-browser-symsrv.commondatastorage.googleapis.com
Deferred                                       SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
*** WARNING: Unable to verify timestamp for Google Chrome Framework
0:000> .reload
................................................................
................................................................
................................................................
................................................
Unable to load image /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/101.0.4951.54/Google Chrome Framework, Win32 error 0n2
*** WARNING: Unable to verify timestamp for Google Chrome Framework

************* Symbol Loading Error Summary **************
Module name            Error
Google Chrome Framewor The system cannot find the file specified

我的问题是如何获得崩溃转储的符号并调试符号?

My application somehow manages to crash a customer's Chrome browser on Mac. I asked the customer to enable crash reports and send me the dump file next time it happens. I got a Crashpad.zip file that contains a bunch of .dmp files. I suppose each file represents a Chrome tab's process. Trying to open these dumps with Visual Studio or WinDbg doesn't work. Note that the dump files were captured on Mac and I'm working on Windows.

When trying to see the callstack with ~k I get the output:

0:000> ~k
 # Child-SP          RetAddr               Call Site
00 00000001`6ee35960 00000000`00000000     Google_Chrome_Framework+0x4486b50

When trying to load symbols from Chromium symbol server I get:

0:000> .sympath+ SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
Symbol search path is: srv*;https://chromium-browser-symsrv.commondatastorage.googleapis.com;SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
Expanded Symbol search path is: cache*;SRV*https://msdl.microsoft.com/download/symbols;https://chromium-browser-symsrv.commondatastorage.googleapis.com;srv\*c:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Deferred                                       https://chromium-browser-symsrv.commondatastorage.googleapis.com
Deferred                                       SRV\*C:\symbols\*https://chromium-browser-symsrv.commondatastorage.googleapis.com
*** WARNING: Unable to verify timestamp for Google Chrome Framework
0:000> .reload
................................................................
................................................................
................................................................
................................................
Unable to load image /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/101.0.4951.54/Google Chrome Framework, Win32 error 0n2
*** WARNING: Unable to verify timestamp for Google Chrome Framework

************* Symbol Loading Error Summary **************
Module name            Error
Google Chrome Framewor The system cannot find the file specified

My question is how can I get symbols for the crash dump and debug it?

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

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

发布评论

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

评论(1

许你一世情深 2025-02-03 14:27:02

CrashPad以有效的Windows Minidump格式编写了其转储。 Microsoft Store中的当前WindBG预览(1.2205.18001.0)确实可以打开和DEBUG crastpad转储,来自Windows以外的其他平台(包括Linux和Mac OS)。它了解并支持男子气概中包含的男子气概图像,男子气概符号和私人矮人符号。

也就是说,这是有用的 - 调试器需要发现目标过程中加载的内容的图像和符号。我在铬方面的经验有限;但是,据我所知,符号服务器仅索引Windows版本。

Linux Elf和Mac Macho图像确实可以在符号服务器上索引。有关此的文档和索引关键格式可在

如果您有直接下载的images/符号(例如:debug package et a debug package et e e debug package等)将它们置于本地路径,将调试器指向.sympath和.reload。

我相信Chromium还拥有自己的一套用于从CrashPad转储中提取信息的工具:

Crashpad writes its dumps in what is, effectively, a Windows minidump format. The current WinDbg Preview (1.2205.18001.0) in the Microsoft store can indeed open and debug crashpad dumps from platforms other than Windows (including Linux and Mac OS). It understands and has support for MachO images, MachO symbols, and private DWARF symbols contained in MachO.

That said -- for that to be useful -- the images and symbols for what is loaded in the target process need to be discoverable by the debugger. I have limited experience on the Chromium front; however, as far as I'm aware, the symbol servers only index the Windows versions there.

Linux ELF and Mac MachO images can indeed be indexed on a symbol server. Documentation regarding that and the indexing key formats is available at https://github.com/dotnet/symstore/blob/main/docs/specs/SSQP_Key_Conventions.md

If you have the images/symbols from downloading something directly (e.g.: a debug package, etc...), you can put them in a local path, point the debugger at such with .sympath and .reload.

I believe that Chromium also has their own set of tools for extracting information from crashpad dumps: https://www.chromium.org/developers/decoding-crash-dumps/

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