summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd_test.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-10-08 09:05:26 -0700
committerTom Cherry <tomcherry@google.com>2019-10-08 13:05:55 -0700
commit5398021b9e55207c56e1465827e03eafb2726145 (patch)
treef5d1b7a3bf214e3c5d2556e1ab3d97839f51e269 /debuggerd/debuggerd_test.cpp
parentc5f8b3925b4ecd1b61caaf4a72d1a0bbc0fc0193 (diff)
liblog: remove alarm in logd_reader.cpp
There is an alarm() call that provides a 30 second timeout in case logd is unavailable. The main reason for this is in the case that logd is crashing, debuggerd is ptrace'ing logd, and tombstoned is attempting to dump log messages. In this case, with no other checks and without this alarm, tombstoned will deadlock when dumping log messages. However, tombstoned already has two mechanisms to prevent the above situation from happening: 1) It checks that the thread name that is is dumping is either logd or starts with "logd." and skips dumping logs in this case. 2) It does not dump logs if it is running in process for any process. Calling alarm() or modifying signal handlers from general purpose libraries is not recommended either, so without a strong reason to keep this, this change removes it. This also shortens the liblog.wrap_mode_blocks test time, since the 30 second issue that it ensures does not happen has been fundamentally removed. Test: `kill -8 `pidof logd`` succeeds without delay Test: liblog, logd unit tests Change-Id: Id8a40544645d220e49f7ba299201af80a0c44de9
Diffstat (limited to 'debuggerd/debuggerd_test.cpp')
0 files changed, 0 insertions, 0 deletions