5398021b9e
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 |
||
---|---|---|
.. | ||
Android.bp | ||
AndroidTest.xml | ||
libc_test.cpp | ||
liblog_benchmark.cpp | ||
liblog_test.cpp | ||
log_id_test.cpp | ||
log_radio_test.cpp | ||
log_read_test.cpp | ||
log_system_test.cpp | ||
log_time_test.cpp | ||
log_wrap_test.cpp | ||
logprint_test.cpp |