platform_system_core/debuggerd/handler
Christopher Ferris a3e9a0b2e1 Always use main thread pid for manual dumping.
When running debuggerd from the command line, it's possible that
the signal will happen on a side thread. The original intercept
in tombstoned is set to only handle crashes from the main thread
pid, so in this case, the intercept doesn't occur. To fix this,
modify the code so that running debuggerd always sends the signal
to the main pid. In addition, modify the signal handler is entered
due to the BIONIC_SIGNAL_DEBUGGER signal, then the crashing tid is
set to the main thread pid instead of the current thread.

Add unit test to cover this case.

Bug: 194346289

Test: All unit tests pass.
Test: Verify the new unit test is getting the signal on the non-main
Test: thread and still properly handling the intercept.
Test: Modify the debuggerd code to send the signal to the non main pid
Test: and verify the dump still occurs correctly.

Change-Id: I2dd1bd11fc8ef4a6fe87f05ecc67ae349a101c82
2021-07-30 14:08:03 -07:00
..
debuggerd_fallback.cpp debuggerd: unify licenses. 2021-06-18 15:49:30 -07:00
debuggerd_fallback_nop.cpp debuggerd: unify licenses. 2021-06-18 15:49:30 -07:00
debuggerd_handler.cpp Always use main thread pid for manual dumping. 2021-07-30 14:08:03 -07:00
fallback.h Fix multithreaded backtraces for seccomp processes. 2018-09-12 18:12:13 -07:00