New issue
Advanced search Search tips

Issue 842806 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

Implement renderer hang crash dumping on Mac

Project Member Reported by rsesek@chromium.org, May 14 2018

Issue description

On Windows, the browser creates and uploads minidumps when it detects a hung renderer (via a timer on input event ack latency). It does this using CrashDumpAndTerminateHungChildProcess(), which injects a thread into the target process and calls DumpWithoutCrashing().

On Mac, we can just have the browser generate a minidump by creating a snapshot of the process, since the browser has all child processes' task ports.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc73f6f1646cf70331ab026d8111e6ccc32bb95a

commit dc73f6f1646cf70331ab026d8111e6ccc32bb95a
Author: Robert Sesek <rsesek@chromium.org>
Date: Tue May 15 15:53:20 2018

Implement renderer hang minidumping on Mac.

When the browser detects that a renderer is hung (via not ack'ing input
events), it displays a hung-page dialog. On Windows, if the user chooses
to kill the page, the browser will generate a minidump for the hung
process for post-mortem analysis. This CL implements the same on Mac.

Bug:  842806 
Change-Id: I2d50fc7395fc6c4fe080a5cc05bfcee8f4f36e79
Reviewed-on: https://chromium-review.googlesource.com/1058009
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558720}
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/BUILD.gn
[delete] https://crrev.com/d26096d9c32230f8db75a0f67d368f134edd86e3/chrome/browser/hang_monitor/DEPS
[add] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/hang_monitor/hang_crash_dump.cc
[add] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/hang_monitor/hang_crash_dump.h
[add] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/hang_monitor/hang_crash_dump_mac.cc
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/hang_monitor/hang_crash_dump_win.cc
[delete] https://crrev.com/d26096d9c32230f8db75a0f67d368f134edd86e3/chrome/browser/hang_monitor/hang_crash_dump_win.h
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/ui/hung_plugin_tab_helper.cc
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/chrome/browser/ui/views/hung_renderer_view.cc
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/components/crash/content/app/BUILD.gn
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/components/crash/content/app/crashpad.cc
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/components/crash/content/app/crashpad.h
[modify] https://crrev.com/dc73f6f1646cf70331ab026d8111e6ccc32bb95a/components/crash/content/app/crashpad_mac.mm

Project Member

Comment 2 by bugdroid1@chromium.org, May 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f76a01a0af9389671b663b69c2423cc0b435a59e

commit f76a01a0af9389671b663b69c2423cc0b435a59e
Author: Robert Sesek <rsesek@chromium.org>
Date: Wed May 16 23:59:13 2018

Properly annotate Mac DumpProcessWithoutCrashing() reports.

They were missing the snapshot-level annotations (prod, ver, plat, and
channel), client ID, and report ID.

Bug:  842806 
Change-Id: Ic6784728d57e747515197bc45e990cb2bb684834
Reviewed-on: https://chromium-review.googlesource.com/1062807
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559344}
[modify] https://crrev.com/f76a01a0af9389671b663b69c2423cc0b435a59e/components/crash/content/app/crashpad_mac.mm

Comment 3 by rsesek@chromium.org, May 18 2018

And http://cl/197152527 for the crash processor change.

Comment 4 by rsesek@chromium.org, May 18 2018

Status: Fixed (was: Started)
Sample hang report from an infinite JS for loop: https://crash.corp.google.com/browse?q=reportid=%276ed1728f4ccc90b5%27

I have noticed, though, that because we do not suspend the process when generating the minidump, if the main thread is making progress (just slowly) then the thread stack will not be very useful. We could switch to suspending the process, but that can be done as a follow-up once we get a sense of the volume.

Sign in to add a comment