Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1217)

Issue 2676023003: breakpad: Fix crash_reporter upload success handling on Chrome OS (Closed)

Created:
3 years, 10 months ago by James Cook
Modified:
3 years, 10 months ago
Reviewers:
vapier, scottmg
CC:
chromium-reviews, darin-cc_chromium.org, jam, kalyank, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

breakpad: Fix crash_reporter upload success handling on Chrome OS Chrome OS incorrectly prints this message to the ui log after each crash: "System crash-reporter failed to process crash report." This makes it confusing to work on crash reporting, as crash_reporter is actually succeeding. The problem was how breakpad listens for the crash id / success string. A helper process reads the crash id/status string from a pipe. That pipe was connected to fd 3 via sys_dup2(). This worked on Linux because wget was configured to write status to /dev/fd/3. This failed on Chrome OS because crash_reporter writes status to stdout (fd 1). This CL wires crash_reporter's output to stdout using sys_dup2(). It also eliminates the dup2() code on Linux, because wget can write directly to the pipe to the helper process. I also pulled out some helper functions because the existing functions are too long, and also added some docs and error checking. BUG=688248 TEST=Navigate to chrome:inducebrowsercrashforrealz on chromebook, look at /var/log/ui/ui.LATEST, see "Crash dump received by crash_reporter" log line. Review-Url: https://codereview.chromium.org/2676023003 Cr-Commit-Position: refs/heads/master@{#448724} Committed: https://chromium.googlesource.com/chromium/src/+/bdead22a98f5f12e9ebc0d9356b5521f5e0be793

Patch Set 1 #

Patch Set 2 : fix unused var #

Total comments: 6

Patch Set 3 : review comments #

Total comments: 2

Patch Set 4 : add trailing \n #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -50 lines) Patch
M components/crash/content/app/breakpad_linux.cc View 1 2 3 12 chunks +79 lines, -50 lines 0 comments Download

Messages

Total messages: 32 (23 generated)
James Cook
vapier, can you take a look at this? I would send it to thestig@, but ...
3 years, 10 months ago (2017-02-03 22:04:42 UTC) #4
vapier
i agree passing down uploader_status_fd makes more sense, but i think it was cleaner to ...
3 years, 10 months ago (2017-02-06 17:17:44 UTC) #11
James Cook
vapier, please take another look. https://codereview.chromium.org/2676023003/diff/20001/components/crash/content/app/breakpad_linux.cc File components/crash/content/app/breakpad_linux.cc (right): https://codereview.chromium.org/2676023003/diff/20001/components/crash/content/app/breakpad_linux.cc#newcode1247 components/crash/content/app/breakpad_linux.cc:1247: const char* dumpfile, On ...
3 years, 10 months ago (2017-02-06 22:09:05 UTC) #12
James Cook
Oh, and I've tested this manually on both on Linux and Chrome OS.
3 years, 10 months ago (2017-02-06 22:09:50 UTC) #14
vapier
lgtm https://codereview.chromium.org/2676023003/diff/40001/components/crash/content/app/breakpad_linux.cc File components/crash/content/app/breakpad_linux.cc (right): https://codereview.chromium.org/2676023003/diff/40001/components/crash/content/app/breakpad_linux.cc#newcode1205 components/crash/content/app/breakpad_linux.cc:1205: const char err[] = "dup2 failed"; this should ...
3 years, 10 months ago (2017-02-07 04:53:09 UTC) #18
James Cook
Scott, can I get OWNERS? I would send it to thestig@, but he's OOO for ...
3 years, 10 months ago (2017-02-07 15:12:45 UTC) #23
scottmg
lgtm
3 years, 10 months ago (2017-02-07 18:07:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2676023003/60001
3 years, 10 months ago (2017-02-07 20:34:50 UTC) #29
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 20:42:08 UTC) #32
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/bdead22a98f5f12e9ebc0d9356b5...

Powered by Google App Engine
This is Rietveld 408576698