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

Issue 2718123003: mash: Store chrome --mash crash key metadata in shared memory

Created:
3 years, 9 months ago by James Cook
Modified:
3 years, 9 months ago
Reviewers:
vapier, hashimoto
CC:
chromium-reviews, kalyank, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Store chrome --mash crash key metadata in shared memory Chrome uses "crash keys" to provide additional metadata for crash dump uploads (e.g. the last active URL). Change chrome mash processes to store their keys in a breakpad SimpleStringDictionary, which is just a fixed- size table of key/value pairs. The dictionary is kept in a block of shared memory named "/chrome_crash_keys_<pid>" such that crash_reporter can find it. The shared memory buffer is cleaned up by Chrome during normal shutdown and by crash_reporter during crashes. The OS-level change to crash reporter is: https://chromium-review.googlesource.com/c/444846/ BUG=692594 TEST=Added to chrome_app_unittests, also manually tested crashing ash and verified the uploaded crash report has valid crash keys on the crash dashboard

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 17
Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -7 lines) Patch
M ash/common/accelerators/debug_commands.cc View 2 chunks +3 lines, -0 lines 1 comment Download
M chrome/app/mash/BUILD.gn View 1 chunk +9 lines, -1 line 0 comments Download
A chrome/app/mash/mash_crash_keys.h View 1 chunk +32 lines, -0 lines 2 comments Download
A chrome/app/mash/mash_crash_keys.cc View 1 chunk +123 lines, -0 lines 9 comments Download
A chrome/app/mash/mash_crash_keys_unittest.cc View 1 chunk +42 lines, -0 lines 2 comments Download
M chrome/app/mash/mash_runner.cc View 3 chunks +17 lines, -4 lines 3 comments Download
M chrome/test/BUILD.gn View 1 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
James Cook
vapier, please take a look.
3 years, 9 months ago (2017-02-27 19:30:10 UTC) #3
James Cook
Ping vapier?
3 years, 9 months ago (2017-02-28 19:22:59 UTC) #11
James Cook
hashimoto, can you take a look? Thanks.
3 years, 9 months ago (2017-03-02 01:03:34 UTC) #13
hashimoto
I'd like to take a look at sample crash report made with this code. Could ...
3 years, 9 months ago (2017-03-02 07:42:23 UTC) #14
hashimoto
A few more comments: - IIUC breakpad's SimpleStringDictionary is suitable for IPC only when used ...
3 years, 9 months ago (2017-03-02 09:49:23 UTC) #15
James Cook
On 2017/03/02 09:49:23, hashimoto wrote: > A few more comments: > - IIUC breakpad's SimpleStringDictionary ...
3 years, 9 months ago (2017-03-07 17:59:56 UTC) #16
vapier
3 years, 9 months ago (2017-03-11 06:15:00 UTC) #17
https://codereview.chromium.org/2718123003/diff/20001/chrome/app/mash/mash_cr...
File chrome/app/mash/mash_crash_keys.cc (right):

https://codereview.chromium.org/2718123003/diff/20001/chrome/app/mash/mash_cr...
chrome/app/mash/mash_crash_keys.cc:56: const int oflag = O_CREAT | O_RDWR;
i don't think this exec's, so should use O_CLOEXEC everywhere unless you need it

https://codereview.chromium.org/2718123003/diff/20001/chrome/app/mash/mash_cr...
chrome/app/mash/mash_crash_keys.cc:59: const mode_t mode = S_IRUSR | S_IWUSR;
S_xxx constants aren't readable.  just use an octal constant like 0600.

Powered by Google App Engine
This is Rietveld 408576698