Description[Crash Reporting] Implement a more direct bridge for extracting logcat output.
When a child process crashes, Chrome attempts to attach recent logcat
output to the minidump for the crash. Previously, this was implemented
via a FileObserver on the crash reports directory: When the file observer
detected a file moved into the directory, and saw that the filename
matched the appropriate regex pattern, it would attempt to append logcat
output. This has two drawbacks:
(1) It's spooky action at a distance, which makes the code harder to
reason about.
(2) There's a super subtle constraint encoded into the "moved to" check:
When the browser process crashes, a crash dump matching the same
file pattern appears in the observed directory, but it is *created*
rather than *moved*. Thus, this check is intentionally excluding
browser crashes, for which the code might otherwise have a race
between trying to attach logcat output and tearing down the main
Java process.
This CL replaces the FileObserver with a direct call from the C++ code
that processes the minidump into the Java code that extracts the logcat.
(Well, there's some indirection to get through the Chrome layering onion,
but the flow is still much more linear.)
BUG=719129
TEST=CrashDumpManagerTest.*
R=gsennton@chromium.org
Review-Url: https://codereview.chromium.org/2878193002
Cr-Commit-Position: refs/heads/master@{#472613}
Committed: https://chromium.googlesource.com/chromium/src/+/6a32f0233caef0ad160bb4c3adcc25bb091ab4d0
Patch Set 1 #Patch Set 2 : git-add new files #
Total comments: 2
Patch Set 3 : tryToAttachLogcat -> tryToUploadMinidump #Patch Set 4 : Add an OWNERS file #
Total comments: 4
Patch Set 5 : Thread safety #Patch Set 6 : Print the minidump path on an error #
Total comments: 2
Patch Set 7 : Document threading more, and fix check_deps #Messages
Total messages: 43 (26 generated)
|