breakpad/src/common
vapier@chromium.org 0ac94ba617 fix races in CrashGenerator::CreateChildCrash
The current CreateChildCrash logic is racy when it comes to creating a
crash dump for two reasons:

The main thread that calls kill() on a different thread is guaranteed
the signal will be *queued* when it returns, but not *delivered*.  If
the kernel doesn't automatically schedule the receiving thread, but
instead lets the main thread run to the exit() call, then the signal
never triggers a coredump and the whole process simply exits.

The main thread is using kill() to try to deliver a signal to a
specific thread, but that function is for sending signals to a
process.  That means the kernel is free to deliver the signal to
any thread in the process and not just the one requested.  This
manifests itself as the pr_pid in the coredump not being the one
expected.  Instead, we must use tkill() with the tid (which we
already took care of gathering) to deliver to a specific thread.

These are a lot easier to see on a UMP system as contention is heavier.

BUG=chromium:207918
TEST=`dumper_unittest` still passes, and doesn't flake out in a UMP system
TEST=`linux_client_unittest` still passes
R=benchan@chromium.org

Review URL: https://breakpad.appspot.com/1304005

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1299 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-02 22:55:12 +00:00
..
android Misc Android-related fixes. 2013-12-13 16:49:11 +00:00
dwarf Adding support for mips. 2013-09-11 11:37:04 +00:00
linux fix races in CrashGenerator::CreateChildCrash 2014-04-02 22:55:12 +00:00
mac Fixing compiler warnings: 2014-02-28 10:21:20 +00:00
solaris Use stdint types everywhere 2013-03-06 14:04:42 +00:00
testdata Breakpad Linux dumper: Make StabsReader independent of endianness and word size. 2010-05-05 17:09:20 +00:00
tests Add missing #include of eintr_wrapper.h to auto_testfile.h. Since it's 2013-12-03 19:01:17 +00:00
windows Add support for Win64 stack unwind data as STACK CFI 2014-03-24 12:12:17 +00:00
basictypes.h Use a proper ignore_result() to fix a ftruncate warn_unused_result warning with GCC 4.8. 2013-12-18 19:52:36 +00:00
byte_cursor.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
byte_cursor_unittest.cc This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
convert_UTF.c Add include guards and avoid redefinition of false/true in convert_UTF. 2013-12-05 23:16:03 +00:00
convert_UTF.h Add include guards and avoid redefinition of false/true in convert_UTF. 2013-12-05 23:16:03 +00:00
dwarf_cfi_to_module.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
dwarf_cfi_to_module.h Adding support for mips. 2013-09-11 11:37:04 +00:00
dwarf_cfi_to_module_unittest.cc Add some more DWARF ARM register numbers to the DWARF CFI register maps 2012-07-18 18:13:29 +00:00
dwarf_cu_to_module.cc Cleanup: Use scoped_ptr where appropriate in DwarfCUToModule. 2013-04-24 21:40:27 +00:00
dwarf_cu_to_module.h Cleanup: Use scoped_ptr where appropriate in DwarfCUToModule. 2013-04-24 21:40:27 +00:00
dwarf_cu_to_module_unittest.cc Add an option to not handle DWARF inter-compilation unit references in Linux dump_syms. 2013-04-24 21:18:44 +00:00
dwarf_line_to_module.cc Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
dwarf_line_to_module.h Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
dwarf_line_to_module_unittest.cc Include the compilation directory for FILE entries, making them absolute instead of relative 2013-01-23 18:01:28 +00:00
language.cc Upstream fix for compiling of breakpad with gcc-4.6. Remove an unnecessary 2011-10-22 16:57:10 +00:00
language.h Fixing various compiler warnings and applying minor tweaks to allow running of 2012-07-02 22:55:57 +00:00
md5.cc Fixup breakpad compile for Xcode 5.1 iOS release 2014-02-24 21:35:40 +00:00
md5.h Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS. 2014-02-18 22:52:02 +00:00
memory.h Fixing compiler warnings: 2014-02-28 10:21:20 +00:00
memory_range.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
memory_range_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
memory_unittest.cc Thanks to Matthew Riley who noticed this issue and provided the initial proposal for the fix. 2013-05-23 18:47:49 +00:00
module.cc Allow reading just CFI data when reading symbols 2013-03-06 15:32:53 +00:00
module.h Allow reading just CFI data when reading symbols 2013-03-06 15:32:53 +00:00
module_unittest.cc Allow reading just CFI data when reading symbols 2013-03-06 15:32:53 +00:00
scoped_ptr.h Switch scoped_ptr.h to a compatible google3 implementation. 2013-12-18 19:49:55 +00:00
simple_string_dictionary.cc Rewrite SimpleStringDictionary with NonAllocatingMap. 2013-04-24 18:15:48 +00:00
simple_string_dictionary.h In NonAllocatingMap, remove asserts around key/value length. 2013-10-01 21:32:16 +00:00
simple_string_dictionary_unittest.cc In NonAllocatingMap, remove asserts around key/value length. 2013-10-01 21:32:16 +00:00
stabs_reader.cc This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
stabs_reader.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
stabs_reader_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
stabs_to_module.cc This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
stabs_to_module.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
stabs_to_module_unittest.cc Put PUBLIC lines in Mac symbol files. 2011-03-04 16:08:39 +00:00
string_conversion.cc Switch to scoped_array instead of inappropriate scoped_ptr. 2013-10-28 23:39:43 +00:00
string_conversion.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
symbol_data.h Allow reading just CFI data when reading symbols 2013-03-06 15:32:53 +00:00
test_assembler.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
test_assembler.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
test_assembler_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
using_std_string.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00