Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashpad cannot compatible with system exception monitor service on macOS platform #61

Open
snilwx opened this issue Mar 1, 2024 · 2 comments

Comments

@snilwx
Copy link

snilwx commented Mar 1, 2024

if I ues crashpad in my app, crashpad can normally generate .dmp file, but the system exception monitor service(com.apple.ReportCrash) cannot generate .ips file.

if I do not use crashpad in my app, the system exception monitor service(com.apple.ReportCrash) can normally generate .ips file.

You can view these .ips files in the console.app

@KrzaQ
Copy link
Contributor

KrzaQ commented Mar 1, 2024

That seems to be the correct behavior. If you install a custom crash handler, it is considered that the crash has been handled.

@snilwx
Copy link
Author

snilwx commented Mar 5, 2024

That seems to be the correct behavior. If you install a custom crash handler, it is considered that the crash has been handled.

I found the following code snippet in the crashpad's source code which is come from crashpad/handler/mac/crash_report_exception_handler.cc, how to understand it?

if (client_options.system_crash_reporter_forwarding != TriState::kDisabled &&
(exception == EXC_CRASH ||
exception == EXC_RESOURCE ||
exception == EXC_GUARD)) {
// Don’t forward simulated exceptions such as kMachExceptionSimulated to the
// system crash reporter. Only forward the types of exceptions that it would
// receive under normal conditions. Although the system crash reporter is
// able to deal with other exceptions including simulated ones, forwarding
// them to the system crash reporter could present the system’s crash UI for
// processes that haven’t actually crashed, and could result in reports not
// actually associated with crashes being sent to the operating system
// vendor.
base::apple::ScopedMachSendRight system_crash_reporter_handler(
SystemCrashReporterHandler());
if (system_crash_reporter_handler.get()) {
...
}

the system crash reporter of macOS is "com.apple.ReportCrash" :

base::apple::ScopedMachSendRight SystemCrashReporterHandler() {
return BootstrapLookUp("com.apple.ReportCrash");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants