Behaviour of OSX out of process crash reporting

280 views
Skip to first unread message

Mark Final

unread,
Jan 18, 2013, 6:40:05 AM1/18/13
to google-breakpad-discuss
Hi,

I have been evaluating out-of-process crashing reporting on OSX.
(Using r1072 of Breakpad from GoogleCode.)

Main application spawns a child process (containing the crash server).
Child process waits until a onClientDumpRequestCallback from the
parent, and then writes out a minidump. This all works fine, and I get
a minidump that is as I would expect when inspected with
minidump_stackwalk.

However, back on the main application, I see the Breakpad exception
handler uninstalled, and exc_server is invoked. There is a bit of spam
to stdout of the form

** Unknown exception behavior: 0

and then the regular Apple Problem Reporter dialog pops up, indicating
the same crash reason as recorded in the minidump.

Is this expected behaviour to also see the Apple Problem Reporter
dialog?

With in-process crash reporting, I do not get the Apple Problem
Reporter dialog after the minidump is written out.

Thanks,

Mark

Ted Mielczarek

unread,
Jan 18, 2013, 1:14:40 PM1/18/13
to google-brea...@googlegroups.com
It's possible that you're just not exiting the process after you handle
the crash. Your usage is backwards from how we use the OOP reporting
(our parent process writes dumps for its child processes), so I don't
have a relevant example to point you to. I believe for our OOP usage we
terminate the child process after dumping it, or it terminates itself.
If you let it go the exception will continue to the OS handler and
you'll get the Apple Crash Reporter dialog like you've seen.

-Ted


Mark Final

unread,
Jan 18, 2013, 1:21:22 PM1/18/13
to google-breakpad-discuss
Thanks for the reply, Ted. The parent process is not exiting directly
after the minidump has been written from the child (containing the
crash server) - I'll take a look at the code and see if I'm missing an
exit strategy.

So that I'm not going to run into a dead end at some point, is my
usage (as you describe, backward to your usage) a valid way of using
Breakpad? If not, I'll change, but it does seem to work nicely on
Windows, and mostly on Linux, so far.

Thanks,

Mark

Ted Mielczarek

unread,
Jan 18, 2013, 1:27:23 PM1/18/13
to google-brea...@googlegroups.com
On 1/18/2013 1:21 PM, Mark Final wrote:
> Thanks for the reply, Ted. The parent process is not exiting directly
> after the minidump has been written from the child (containing the
> crash server) - I'll take a look at the code and see if I'm missing an
> exit strategy.
>
> So that I'm not going to run into a dead end at some point, is my
> usage (as you describe, backward to your usage) a valid way of using
> Breakpad? If not, I'll change, but it does seem to work nicely on
> Windows, and mostly on Linux, so far.
>
>
I don't think there's any particular reason this shouldn't work. AIUI
Google runs a totally separate process (GoogleCrashHandler.exe) to
handle crashes for various applications. I think you're either running
into corner-cases that weren't considered in the original design, or the
usual undocumented assumptions about what your code ought to be doing.
There are more than a few assumptions about what callers do that aren't
documented in the Breakpad source. If you find such things we'd be happy
to take patches.

-Ted

Mark Final

unread,
Jan 18, 2013, 1:33:50 PM1/18/13
to google-breakpad-discuss
I shall, of course, post anything I find.

Speaking of which, I had to incorporate this patch (from yourself, I
believe) to get out-of-process reporting working on Linux

http://hg.mozilla.org/users/tmielczarek_mozilla.com/breakpad-mq/file/dfd8d050f0a3/no-close-on-exec

as the socket file description I created in the parent, was being
closed upon forking to the child crash server process.
I've got that applied in our local copy of the Breakpad source (taken
from svn r1072).

Mark

Mark Final

unread,
Mar 11, 2013, 11:53:50 AM3/11/13
to google-breakpad-discuss
I just noticed a fix for this, SVN r1127, on the Breakpad repository. It works fabulously! No more Apple Reporter Problem showing up!

Thanks Ted!

Mark


--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To post to this group, send email to google-brea...@googlegroups.com.
To unsubscribe from this group, send email to google-breakpad-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-breakpad-discuss?hl=en.




--
Mark Final
Lead Dev Ops Engineer
The Foundry, 6th Floor, The Communications Building,
48 Leicester Square, London, UK, WC2H 7LT
Tel: +44(0)20 7968 6828 - Fax: +44(0)20 7930 8906

Web: www.thefoundry.co.uk
Email: mark....@thefoundry.co.uk  

The Foundry Visionmongers Ltd.
Registered in England and Wales No: 4642027

Ted Mielczarek

unread,
Mar 11, 2013, 12:07:10 PM3/11/13
to google-brea...@googlegroups.com
On 3/11/2013 11:53 AM, Mark Final wrote:
> I just noticed a fix for this, SVN r1127, on the Breakpad repository.
> It works fabulously! No more Apple Reporter Problem showing up!
>
> Thanks Ted!

Glad that fixed your problem! I independently discovered that issue, it
was causing issues with our Firefox unit tests.

-Ted

Reply all
Reply to author
Forward
0 new messages