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

Issue 150001: Fix a couple of bugs where we generate incorrect minidump files on...

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by markus
Modified:
14 years, 2 months ago
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fix a couple of bugs where we generate incorrect minidump files on
Linux (e.g. use the same stream id twice, truncate /proc files, ...)

Add support for writing out the current list of DSOs.

If we recognize a stackframe that was generated when the seccomp sandbox
intercepted a system call, clean up the stack in the crash dump. This
allows for proper backtraces of sandboxed applications.

Don't dump information about threads that don't have a valid stack
pointer. There isn't really anything we can dump in this case anyway, and
the data would be completely uninteresting.

BUG=none
TEST=trigger a crash dump in a sandbox'd process and verify the minidump with
minidump-2-core

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/client/linux/handler/exception_handler.cc View 1 4 chunks +7 lines, -3 lines 0 comments Download
M src/client/linux/minidump_writer/linux_dumper.cc View 2 chunks +32 lines, -4 lines 1 comment Download
M src/client/linux/minidump_writer/minidump_writer.cc View 1 10 chunks +253 lines, -23 lines 1 comment Download
M src/common/linux/memory.h View 1 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 5
markus
Please let me know, if this looks OK. A lot of this code is specific ...
14 years, 2 months ago #1
Lei Zhang (chromium)
http://breakpad.appspot.com/150001/diff/1/2 File src/client/linux/handler/exception_handler.cc (right): http://breakpad.appspot.com/150001/diff/1/2#newcode272 Line 272: tgkill(getpid(), syscall(__NR_gettid), sig); // TODO(markus): mask signal and ...
14 years, 2 months ago #2
markus
http://breakpad.appspot.com/150001/diff/1/4 File src/client/linux/minidump_writer/minidump_writer.cc (right): http://breakpad.appspot.com/150001/diff/1/4#newcode476 Line 476: return false; You are right. NullifyDirectoryEntry() is probably ...
14 years, 2 months ago #3
Lei Zhang (chromium)
LGTM. I'll commit both CLs after TGIF and then roll deps on the Chromium side. ...
14 years, 2 months ago #4
kmixter
14 years, 2 months ago #5
I know this has already been landed, but a few comments.

Is the DSO_DEBUG stream only useful for gdb/minidump-2-core - in other words,
should stack traces through DSOs should already be walkable in the processor
without this?

http://breakpad.appspot.com/150001/diff/7001/8002
File src/client/linux/minidump_writer/linux_dumper.cc (right):

http://breakpad.appspot.com/150001/diff/7001/8002#newcode88
Line 88: #if defined(__i386)
won't this fail to compile on other architectures?

http://breakpad.appspot.com/150001/diff/7001/8003
File src/client/linux/minidump_writer/minidump_writer.cc (right):

http://breakpad.appspot.com/150001/diff/7001/8003#newcode393
Line 393: dumper_.CopyFromProcess(&dyn, crashing_tid_, _DYNAMIC+i++,
sizeof(dyn));
Why not just put ++i in the for loop?  _DYNAMIC points to .dynamic section,
right?  That section's virtual address varies by process, so this really assumes
the dumping process is the same or forked from the crashing process.  May be
good to comment on this assumption since most (all?) of the rest of the dumper
avoids it.  The alternative would be to find it in procfs (not sure where) or
read the sections in crashing process' the ELF file.
Sign in to reply to this message.

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