bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

hang in malloc lock during exception handling on OS X

RESOLVED FIXED in mozilla22

Status

()

Toolkit
Crash Reporting
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ted, Assigned: ted)

Tracking

unspecified
mozilla22
x86_64
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 721395 [details]
plugin-container hang sample

I was trying to reproduce bug 706751 by running test_content_annotation.js in a loop on my MBP. The test hung, so I sampled the plugin-container process (see attached).

Breakpad calls exc_server, which calls dlsym to find _catch_exception_raise (in libxul), which mallocs. Some other thread has the malloc lock so we're hung.

I *think* this is just a failure in our OOP exception-handling code. In the in-process case, we simply call exit() after writing out the minidump and exec()ing the crashreporter. In the OOP case, we don't actually exit after requesting that the parent process write a dump, so it's possible for us to fall down into this exc_server call and hit this condition.
Specifically WriteMinidumpWithException either writes a dump and calls the callback (in-process), or calls CrashGenerationClient's RequestDump method:
http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/google-breakpad/src/client/mac/handler/exception_handler.cc#523

In the in-process case we exit during our callback. In the OOP case we don't exit. I think this is actually just a bug in the Breakpad OOP code. We should be honoring _exit_after_write in the IsOutOfProcess block here:
http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/google-breakpad/src/client/mac/handler/exception_handler.cc#341
Blocks: 706751
Landed a patch upstream that should fix this:
http://code.google.com/p/google-breakpad/source/detail?r=1127

Will update our Breakpad snapshot shortly.
Assignee: nobody → ted
Depends on: 848880
Just pushed an updated Breakpad snapshot that includes this fix.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.