Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(28)

Issue 1624002: Add flags to control the amount of information written to Linux minidump files

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years ago by Pedro Navarro
Modified:
6 years, 3 months ago
CC:
google-breakpad-dev_googlegroups.com
Visibility:
Public.

Description

On embedded Linux devices the amount of persistent store is usually very
limited. In many cases, and to prevent flash memory wear, persistent store is
implemented as a small RAM drive that gets commited to storage after a vendor
specified  interval has passed.

Because of this it's necessary to let the user control which Minidump streams is
interested in, to avoid the current "huge" ~300-350Kb minidump files. To achieve
that I have added a ContentFlags bitwise enum (which defaults to DUMP_ALL, so
the there are no changes if the user doesn't set any flags) that controls what
is written (decoupling the Thread List, so it's possible to only write the
crashing thread info) and also if a forced stack limit is set (which
unconditionally limits the stack, instead of the current behavior of only doing
it if more than 20 threads are running and a file limit is set on the
MinidumpDescriptor).

The ContentFlags are set from the MinidumpDescriptor class.

enum ContentFlags {
    DUMP_CRASH_THREAD       = (1 << 0), // Dump the crashing thread
    DUMP_ADDITIONAL_THREADS = (1 << 1), // Dump the other threads
    DUMP_LIMIT_STACK_SIZE   = (1 << 2), // Limit the stack size
    DUMP_MAPPINGS           = (1 << 3),
    DUMP_APP_MEMORY         = (1 << 4),
    DUMP_MEMORY_LIST        = (1 << 5),
    DUMP_EXCEPTION          = (1 << 6),
    DUMP_SYSTEM_INFO        = (1 << 7),
    DUMP_LINUX_CPU_INFO     = (1 << 8),
    DUMP_LINUX_PROC_STATUS  = (1 << 9),
    DUMP_LINUX_LSB_RELEASE  = (1 << 10),
    DUMP_LINUX_CMD_LINE     = (1 << 11),
    DUMP_LINUX_ENVIRON      = (1 << 12),
    DUMP_LINUX_AUXV         = (1 << 13),
    DUMP_LINUX_MAPS         = (1 << 14),
    DUMP_LINUX_DSO_DEBUG    = (1 << 15),

    DUMP_ALL                = -1 & ~(DUMP_LIMIT_STACK_SIZE)
};

Patch Set 1 #

Total comments: 9

Patch Set 2 : Moved content flags from MinidumpDescriptor to ExceptionHandler. Added content presets and unit tes… #

Total comments: 8

Patch Set 3 : Build against the latest code and address all review issues. Add a way to control the maximum threa… #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/client/linux/crash_generation/crash_generation_server.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/client/linux/handler/exception_handler.cc View 1 2 5 chunks +57 lines, -3 lines 0 comments Download
M src/client/linux/handler/exception_handler.h View 1 2 6 chunks +68 lines, -2 lines 0 comments Download
M src/client/linux/handler/exception_handler_unittest.cc View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M src/client/linux/minidump_writer/minidump_writer.cc View 1 2 12 chunks +235 lines, -156 lines 0 comments Download
M src/client/linux/minidump_writer/minidump_writer.h View 1 2 5 chunks +85 lines, -2 lines 0 comments Download
M src/client/linux/minidump_writer/minidump_writer_unittest.cc View 1 2 13 chunks +145 lines, -10 lines 0 comments Download
M src/tools/linux/core2md/core2md.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 18
Pedro Navarro
This patch lets the user control what gets written to the minidump file and if ...
7 years ago #1
Lei Zhang (chromium)
Generally look ok here. Ted, do you have high level comments?
7 years ago #2
Ted Mielczarek
Concept looks good, just have a few qualms about the layout of things. https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/exception_handler.h File ...
7 years ago #3
Pedro Navarro
https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/exception_handler.h File src/client/linux/handler/exception_handler.h (right): https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/exception_handler.h#newcode169 src/client/linux/handler/exception_handler.h:169: const ContentFlags = DUMP_ALL); Would that be preferred to ...
7 years ago #4
Ted Mielczarek
https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/exception_handler.h File src/client/linux/handler/exception_handler.h (right): https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/exception_handler.h#newcode169 src/client/linux/handler/exception_handler.h:169: const ContentFlags = DUMP_ALL); I wrote that before I ...
7 years ago #5
Pedro Navarro
https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/minidump_descriptor.h File src/client/linux/handler/minidump_descriptor.h (right): https://breakpad.appspot.com/1624002/diff/1/src/client/linux/handler/minidump_descriptor.h#newcode52 src/client/linux/handler/minidump_descriptor.h:52: explicit MinidumpDescriptor(const string& directory, ContentFlags flags = ContentFlags(-1)) No ...
7 years ago #6
Pedro Navarro
https://breakpad.appspot.com/1624002/diff/130002/src/client/linux/minidump_writer/minidump_writer_unittest.cc File src/client/linux/minidump_writer/minidump_writer_unittest.cc (right): https://breakpad.appspot.com/1624002/diff/130002/src/client/linux/minidump_writer/minidump_writer_unittest.cc#newcode695 src/client/linux/minidump_writer/minidump_writer_unittest.cc:695: ASSERT_LE(normal_file_size, st.st_size); Sometimes, even without my patch applied, the ...
7 years ago #7
Pedro Navarro
Any news on the patch?
7 years ago #8
Lei Zhang (chromium)
https://breakpad.appspot.com/1624002/diff/130002/src/client/linux/handler/exception_handler.h File src/client/linux/handler/exception_handler.h (right): https://breakpad.appspot.com/1624002/diff/130002/src/client/linux/handler/exception_handler.h#newcode136 src/client/linux/handler/exception_handler.h:136: ContentFlags flags = DUMP_ALL); I realize this is a ...
7 years ago #9
Pedro Navarro
Finally got some time to work on this again! I updated the patch to build ...
6 years, 6 months ago #10
Pedro Navarro
Can I get somebody to take a look? We are now using the patch but ...
6 years, 5 months ago #11
Pedro Navarro
Breakpad team, can somebody review my patch? We would like to ship our product and ...
6 years, 4 months ago #12
casinobong88
https://smart.b88ag.com/MemberInfo/DownlineList.aspx
6 years, 3 months ago #13
casinobong88
On 2015/01/20 23:34:52, casinobong88 wrote: > https://smart.b88ag.com/MemberInfo/DownlineList.aspx https://smart.b88ag.com/MemberInfo/DownlineList.aspx
6 years, 3 months ago #14
casinobong88
On 2015/01/09 00:36:00, Pedro Navarro wrote: > <font><font>Đội Breakpad, ai đó có thể xem lại ...
6 years, 3 months ago #15
casinobong88
On 2015/01/20 23:37:28, casinobong88 wrote: > <font><font>Ngày 2015/01/09 00:36:00, Pedro Navarro đã viết:</font></font><font></font><font><font> > > ...
6 years, 3 months ago #16
casinobong88
On 2015/01/20 23:38:16, casinobong88 wrote: > <font><font>Ngày 2015/01/20 23:37:28, casinobong88 đã viết:</font></font><font></font><font><font> > > <Font> ...
6 years, 3 months ago #17
casinobong88
6 years, 3 months ago #18
On 2015/01/21 00:05:43, casinobong88 wrote:
> <font><font>Ngày 2015/01/20 23:38:16, casinobong88 đã
viết:</font></font><font></font><font><font>
> > <Font> <font> Ngày 2015/01/20 23:37:28, casinobong88
have</font></font><font></font><font><font>
> viết: </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> >> <Font> <font> Ngày 2015/01/09 00:36:00, Pedro
Navarro</font></font><font></font><font><font>
> có </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Viết: </ font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > >> <Font> <font> Đội Breakpad, ai which thể xem lại bản vá của tôi Diễn đàn
Diễn đàn</font></font><font></font><font><font>
> Diễn </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Đàn? </font><font></ Font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> >> </ Font> <font> We wish gửi sản phẩm</font></font><font></font><font><font>
> of </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > They </ font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> >> Tôi </ font> </ font> <font> </
font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > <Font> </ font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > >> VA yêu cầu of arguments tác of us to be phát hành
chính</font></font><font></font><font><font>
> thức </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Breakpad </ font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> >> Thầy since chính we </ font> </ font>. </font><font></ Font> <font> <font>
</ font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > <Font> </ font> </ font> <font> </ font>
<font></font></font><font></font><font><font>
> <Font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > >> Cảm ơn! </font><font></ Font> <font> </ font> </ font> </ font> </ font>
<font> </</font></font><font></font><font><font>
> font> </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> >></font></font><font></font><font><font>
>
</font></font>https://mb.b88ag.com/%2528S%2528ytvp5fvrggb5rjagpzsdnp42%2529%2529/index.aspx<font></font><font><font></font></font><font></font><font><font>
> > <! </font><font>DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional
//</font></font><font></font><font><font>
> EN "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> ></font></font><font></font><font><font>
>
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html</font></font><font></font><font><font></font></font><font></font><font><font>
> > Xmlns = "http://www.w3.org/1999/xhtml"> <head> <title> </
title></font></font><font></font><font><font>
> <Link </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Href = "/ _ GlobalResources / Css / Agent.css? 20141230" rel =
"stylesheet"</font></font><font></font><font><font>
> type = "text / css" </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > /> <Liên kết href = "/ _ Reports / PortalPage / Resources /
PortalPage.css?</font></font><font></font><font><font>
> 20141230 "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Rel = "stylesheet" type = "text / css" class /> </ head> <body> <div> <table
=</font></font><font></font><font><font>
> "TblMain" </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Cellspacing = "0"> <tr> <td valign = "top" style = "width: 50%"> <div id
=</font></font><font></font><font><font>
> "BalanceInfo" </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Class = "padding-right"> </ div> </ td> <td valign = "top" style =
"width:</font></font><font></font><font><font>
> 50% "> <div </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Id = "Thống kê" class = "padding-right"> </ div> </ td> </ tr> <tr>
<td</font></font><font></font><font><font>
> colspan = "2" </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Valign = "top"> <div id = "Thông báo" </ font> </ font> <font> </ font>
<font> <font></font></font><font></font><font><font>
> > Class = "padding-top-right"> </ div> </ td> </ tr> </ table> </
div></font></font><font></font><font><font>
> <Script </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Src = "/ _ GlobalResources / Js /
Core.js?</font></font><font></font><font><font>
> 20141230 "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Type = "text / javascript"> </
script></font></font><font></font><font><font>
> <Script </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Src = "/ _ Linh kiện / AGEWnd /
AGEWnd.js?</font></font><font></font><font><font>
> 20141230 "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Type = "text / javascript"> </
script></font></font><font></font><font><font>
> <Script </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Src = "/ _ Linh kiện / Paging /
Paging.js?</font></font><font></font><font><font>
> 20141230 "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Type = "text / javascript"> </
script></font></font><font></font><font><font>
> <Script </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Src = "/ _ Reports / PortalPage / Resources /
PortalPage.js?</font></font><font></font><font><font>
> 20141230 "</ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > Type = "text / javascript"> </ script> </ body> </ html> <script type =
"text</font></font><font></font><font><font>
> / Javascript "> var </ font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > _page = </ Font> </ font> <font> </ font> <font>
<font></font></font><font></font><font><font>
> > {'Chìa khóa': '0cZoQYuB / DDhEw0CNKuvNg ==', 'RemoveOnlineList': true,
'multiple</font></font><font></font><font><font>
> than ':' Nhiều hơn ... "}; </font><font></ Script> </ font> </
font></font></font><font></font>
> https://mb.b88ag.com/%28S%28yy3b2annsq2ya3t5ekumptdk%29%29/index.aspx
 *
* Tạo 20110707 @ Simon - chức năng Javascript để bật lên thông báo.
* Revision? @? - ...
*
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted