breakpad/src/client/linux
Lars Volker 54a54702a1 Fix race in ExceptionHandler::GenerateDump()
When writing a minidump on Linux, we called clone() in
linux/handler/exception_handler.cc with the CLONE_FILES flag. If the
parent process died while the child waited for the continuation signal,
the write side of the pipe 'fdes' stayed open in the child. The child
would not receive a SIGPIPE and would wait forever.

To fix this, we clone without CLONE_FILES and then close the
read-side of fdes in the master before the ptrace call. That way, if the
master dies, the child will receive a SIGPIPE and will die, too.

To test this I added a sleep() call before SendContinueSignalToChild()
and then killed the master, manually observing that the child would die,
too.

Bug: 728
Change-Id: Ifd72de835a34e7d9852ae1a362e707fdc6c96c7e
Reviewed-on: https://chromium-review.googlesource.com/464708
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2017-05-10 18:02:37 +00:00
..
crash_generation crash_generation: fix bad call to close 2016-12-09 15:56:26 +00:00
data The symbol files necessary for the processor to walk stacks on Linux that have __kernel_vsyscall at innermost frame. Special symbol files ar eneeded because EBP does not point to the frame when a thread is inside a system call. 2009-06-25 21:36:39 +00:00
dump_writer_common Add API to skip dump if crashing thread doesn't reference a given module 2017-01-18 15:41:07 +00:00
handler Fix race in ExceptionHandler::GenerateDump() 2017-05-10 18:02:37 +00:00
log [microdump] Move microdump writes to the crash ring-buffer log 2015-08-17 10:32:26 +00:00
microdump_writer Treat the process stack as the top of memory for free space histograms. 2017-03-29 10:42:31 +00:00
minidump_writer Fixing breakpad on old linux kernel 2017-04-21 17:28:03 +00:00
sender GoogleCrashdumpUploader: adds Upload(string*) API to get the HTTP response. 2014-09-18 16:48:49 +00:00