platform_system_core/debuggerd
Christopher Ferris 98d6242dc7 Limit the number of log messages in a tombstone.
Some testing environments can have a test that is sending many
thousands of messages to the log. When this type of process crashes
all of these log messages are captured and can cause OOM errors
while creating the tombstone.

Added a test to verify the log messages are truncated. Leaving this
test disabled for now since it is inherently flaky due to having to
assume that 500 messages are in the log.

Added a test for a newline in a log message since it's somewhat
related to this change.

NOTE: The total number of messages is capped at 500, but if a message
contains multiple newlines, the total messages will exceed 500.
Counting messages this way seems to be in the spirit of the cap,
that a process logging a large message with multiple newlines does
not completely fill the tombstone log data.

Bug: 269182937
Bug: 282661754

Test: All unit tests pass.
Test: The disabled max_log_messages test passes.
Change-Id: If18e62b29f899c2c4670101b402e37762bffbec6
2023-05-24 20:10:55 +00:00
..
client debuggerd: simplify output handling 2023-05-19 15:19:06 -07:00
common/include Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
crasher Handle with the nonnull case in a tricky way 2023-03-31 23:50:37 +00:00
handler Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
include/debuggerd Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
libdebuggerd Limit the number of log messages in a tombstone. 2023-05-24 20:10:55 +00:00
proto Add tomstone proto support for riscv64 2022-10-12 22:31:45 +00:00
rust/tombstoned_client Make some debuggerd libraries available in apex com.android.virt 2022-04-05 15:55:16 +00:00
seccomp_policy Add seccomp policy for riscv64 crash_dump 2022-10-12 22:31:39 +00:00
test_permissive_mte Disable clang-tidy on crash test. 2023-01-03 15:58:29 -08:00
tombstoned Switch to tombstoned.microdroid 2022-10-24 15:56:33 +00:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Merge "riscv64: fix debuggerd_test build." 2023-03-21 18:56:36 +00:00
crash_dump.cpp Merge "[debuggerd] New protocol to AM to handle recoverable crashes." 2023-03-29 20:28:35 +00:00
crash_test.cpp Add a test to verify the dex_pc is correct. 2021-09-15 22:14:28 +00:00
crash_test.h Add a test to verify the dex_pc is correct. 2021-09-15 22:14:28 +00:00
debuggerd.cpp debuggerd: simplify output handling 2023-05-19 15:19:06 -07:00
debuggerd_benchmark.cpp debuggerd: add pause time benchmark. 2017-12-19 16:36:04 -08:00
debuggerd_test.cpp Limit the number of log messages in a tombstone. 2023-05-24 20:10:55 +00:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
OWNERS Remove jmgao from OWNERS files. 2021-08-10 21:42:14 -07:00
pbtombstone.cpp Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
protocol.h Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
TEST_MAPPING Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
tombstone_handler.cpp Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
tombstone_handler.h Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
util.cpp Fix fallback paths for dumping threads. 2022-05-27 13:05:56 -07:00
util.h Dump threads in tombstone fallback path. 2022-02-16 15:02:38 -08:00