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

Issue 2161713002: Recover memory mappings before writing dump on ChromeOS (Closed)

Created:
4 years, 5 months ago by Ting-Yuan (Leo) Huang
Modified:
4 years, 5 months ago
Reviewers:
Mark Mentovai, llozano, Wez
CC:
google-breakpad-dev_googlegroups.com, Simon Que
Base URL:
https://chromium.googlesource.com/breakpad/breakpad.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Recover memory mappings before writing dump on ChromeOS On Linux, breakpad relies on /proc/[pid]/maps to associate symbols from addresses. ChromeOS' hugepage implementation replaces some segments with anonymous private pages, which is a restriction of current implementation in Linux kernel at the time of writing. Thus, breakpad can no longer symbolize addresses from those text segments replaced by hugepages. This patch tries to recover the mappings. Because hugepages are always inserted in between some .text sections, it tries to infer the names and offsets of the segments, by looking at segments immediately precede and succeed them. For example, a text segment before hugepage optimization 02001000-03002000 r-xp /opt/google/chrome/chrome can be broken into 02001000-02200000 r-xp /opt/google/chrome/chrome 02200000-03000000 r-xp 03000000-03002000 r-xp /opt/google/chrome/chrome BUG=crbug.com/628040 R=mark@chromium.org Committed: https://chromium.googlesource.com/breakpad/breakpad/+/41b91d064ecda6cbcc1eb9b8fe1a1f999b6188b7

Patch Set 1 #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -0 lines) Patch
M src/client/linux/minidump_writer/linux_dumper.cc View 2 chunks +172 lines, -0 lines 15 comments Download

Messages

Total messages: 13 (4 generated)
Ting-Yuan (Leo) Huang
4 years, 5 months ago (2016-07-18 18:14:25 UTC) #2
Mark Mentovai
LGTM https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc File src/client/linux/minidump_writer/linux_dumper.cc (right): https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc#newcode518 src/client/linux/minidump_writer/linux_dumper.cc:518: // Merge adjacent mappings with the same name ...
4 years, 5 months ago (2016-07-18 22:03:29 UTC) #3
Wez
Drive-by comments; feel free to ignore as necessary. ;) https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc File src/client/linux/minidump_writer/linux_dumper.cc (right): https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc#newcode113 src/client/linux/minidump_writer/linux_dumper.cc:113: ...
4 years, 5 months ago (2016-07-18 22:28:15 UTC) #5
Wez
https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc File src/client/linux/minidump_writer/linux_dumper.cc (right): https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc#newcode241 src/client/linux/minidump_writer/linux_dumper.cc:241: TryRecoverMappings(mappings[i], mappings[i + 1], mappings[i + 2]); If we ...
4 years, 5 months ago (2016-07-18 22:30:48 UTC) #6
Ting-Yuan (Leo) Huang
On 2016/07/18 22:03:29, Mark Mentovai wrote: > LGTM > Thanks! > https://codereview.chromium.org/2161713002/diff/1/src/client/linux/minidump_writer/linux_dumper.cc > File src/client/linux/minidump_writer/linux_dumper.cc ...
4 years, 5 months ago (2016-07-18 22:48:29 UTC) #7
llozano1
On 2016/07/18 22:48:29, Ting-Yuan (Leo) Huang wrote: > On 2016/07/18 22:03:29, Mark Mentovai wrote: > ...
4 years, 5 months ago (2016-07-18 22:52:56 UTC) #8
Ting-Yuan (Leo) Huang
To be sure, these are the test steps I did: 1. login with guest/a normal ...
4 years, 5 months ago (2016-07-18 22:55:08 UTC) #9
Mark Mentovai
Yes, I’m going to land this in the Breakpad repository now to unblock things. You’ll ...
4 years, 5 months ago (2016-07-19 00:10:13 UTC) #10
Mark Mentovai
4 years, 5 months ago (2016-07-19 00:11:15 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
41b91d064ecda6cbcc1eb9b8fe1a1f999b6188b7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698