Introducing Crashpad

10,408 views
Skip to first unread message

Mark Mentovai

unread,
Mar 13, 2015, 2:32:44 PM3/13/15
to chromium-dev
Last night, we landed a new crash reporting client for Mac OS X in Chrome. This is the first part of Crashpad, which is is replacing our current crash reporter, the aging Breakpad.

Crashpad became a priority last summer when Apple announced Mac OS X 10.10 (“Yosemite”), which broke interfaces that Breakpad relied on to implement its style of out-of-process crash reporting. Since Apple no longer wanted to support those interfaces, and it wasn’t possible to fix the Breakpad client, we had to switch Chrome to use in-process crash reporting on that OS version. Due to Chrome’s use of sandboxing, in-process crash reporting only worked in Chrome’s browser process. We’ve been in the dark with respect to Mac renderer process crashes on Yosemite, which was released in October 2014.

We’re in the process of building a new Crashpad-enabled canary, 43.0.2331.3, which should be released later today. We’re hoping to bring Crashpad to Mac Chrome 42 soon, since we’re essentially blind to an increasing number of crashes until we’ve shipped it.

The Crashpad Mac client has an entirely new design that enables full out-of-process crash reporting compatible with all Mac OS X versions from 10.6 to 10.10. The new implementation goes beyond Breakpad’s capabilities, and it’s now possible to fully monitor a process for crashes without it needing to be aware of the monitoring. In Chrome, we set up a Crashpad handler early in browser process startup, and it’s inherited by all child processes, including renderer processes. Crashpad also monitors for crashes in a way that catches many things that Breakpad missed, even on earlier OS versions.

If you’re developing on Mac, you may notice Crashpad is always built into Chromium, a departure from how Breakpad was integrated. You may also notice that a new executable named crashpad_handler runs whenever Chrome is open. crashpad_handler will always monitor Chrome processes for crashes, and will handle them by writing crash dumps. Crash reports aren’t uploaded to a collection server unless the crash reporting opt-in checkbox is enabled, which is only possible in official builds. This crash monitoring does not interfere with debugging in any way, another improvement over Breakpad. crashpad_handler exits once all processes it’s monitoring have exited, unless it’s in the middle of an upload, in which case it will wait for the upload to finish.

Another major difference from Breakpad is that Crashpad has very full test coverage, where Breakpad had nearly no test coverage. While Crashpad is composed of a lot of brand-new code, it’s code that I have much more confidence in than what it’s replacing.

We’re actively working on bringing the Crashpad client to Windows, along with many more improvements. We have plans to replace other Breakpad components such as the crash report processor as well. I’m hopeful that all parts of Crashpad and all of its users will benefit from this more robust platform with increased test coverage and a clean design inspired by nine years of experience with its predecessor.

If you’re interested, the project home is https://crashpad.googlecode.com/ (for now).

Buckle up!
Mark
(with thanks to rsesek and scottmg)

Kenneth Russell

unread,
Mar 13, 2015, 4:38:18 PM3/13/15
to Mark Mentovai, chromium-dev
This is awesome and is surely going to have a huge impact even beyond
the Chromium project. Nice work Mark, Robert, Scott and others pushing
this through!
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

Jiang Jiang

unread,
Mar 15, 2015, 7:05:24 AM3/15/15
to Mark Mentovai, chromium-dev
On Fri, Mar 13, 2015 at 7:32 PM, Mark Mentovai <ma...@chromium.org> wrote:
> We’re actively working on bringing the Crashpad client to Windows, along
> with many more improvements. We have plans to replace other Breakpad
> components such as the crash report processor as well. I’m hopeful that all
> parts of Crashpad and all of its users will benefit from this more robust
> platform with increased test coverage and a clean design inspired by nine
> years of experience with its predecessor.

Is Chrome for Linux also going to use Crashpad?

- Jiang

Robert Sesek

unread,
Mar 16, 2015, 11:37:47 AM3/16/15
to jia...@opera.com, Mark Mentovai, chromium-dev
The ultimate end goal is for Crashpad to entirely replace Breakpad, so yes. But development for Android/Linux has not yet started, unlike for Windows where work is already underway.

rsesek / @chromium.org 
Reply all
Reply to author
Forward
0 new messages