Go to file
Mark Salyzyn f280b020b1 liblog: resolve deadlocks (part deux)
(cherry pick from commit 2d2e0a5c5e)

Although ever present, an increased regression introduced with
commit b6bee33182 (liblog: logd:
support logd.timestamp = monotonic).

A signal handler can interrupt in locked context, if log is written
in the signal handler, we are in deadlock. To reduce the contention
and chances for this problem separate out timestamp lock from is
loggable lock to reduce contention situations. Provide a best-guess
response if lock would fail in timestamp path.

Use a common lock() inline within each module, with a comment speaking
to the issues surrounding calling a function that has a mutex within
a signal handler.

ToDo: Hold off signals temporarily in mainline, restart when unblock.
      Can not use pthread_sigmask(SIG_BLOCK,,) as it breaks AtCmd.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 25563384
Change-Id: I47e2c87c988c3e359eb9eef129c6a3a08e9eedef
2015-11-25 13:52:09 -08:00
adb Fix "adb remount" for when the root directory is in system.img 2015-11-16 08:53:04 -08:00
adf libadf: enable -Werror 2015-03-10 15:14:38 -07:00
base Sync with master fastboot. 2015-11-16 08:53:51 -08:00
cpio fs_config: replace getenv('OUT') by new fs_config parameter 2015-07-09 21:47:07 -07:00
debuggerd Remove __DATE__/__TIME__ from init and debuggerd 2015-10-30 14:51:29 -07:00
fastboot Fix fastboot to not add '-' before suffix 2015-11-16 12:48:58 -08:00
fingerprintd Fingerprint: Add HAL close() code 2015-07-10 16:26:32 -07:00
fs_mgr fs_mgr: Add support for A/B partitions 2015-11-16 08:53:04 -08:00
gatekeeperd [gatekeeperd] Check parent profile for SID lookups 2015-08-05 10:32:13 -07:00
gpttool gpttool: turn on -Werror 2014-05-05 10:30:04 -07:00
healthd healthd: Read the max power supply voltage 2015-11-16 08:53:51 -08:00
include liblog: resolve deadlocks (part deux) 2015-11-25 13:52:09 -08:00
init init: skip "name" DT entry 2015-11-16 08:53:51 -08:00
libbacktrace Add a logging handler on timeout. 2015-09-03 19:06:06 -07:00
libcutils Fix build break with uninitialized boost_fd. 2015-11-18 16:42:44 -08:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion am 8d2cd035: am 2ddb9cb1: am ed43be39: Merge "Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed." 2015-04-02 22:07:16 +00:00
liblog liblog: resolve deadlocks (part deux) 2015-11-25 13:52:09 -08:00
libmemtrack Add missing <malloc.h> and <string.h> includes. 2015-01-28 11:37:57 -08:00
libmincrypt Enable clang compilation. 2015-05-15 16:13:19 -07:00
libnativebridge LibNativeBridge: Version 2 2015-05-31 16:58:24 -07:00
libnetutils am f91c0664: am 421d01c8: am d4196ef8: Merge "Add a command to call libnetutils\' do_dhcp." 2015-04-22 03:32:13 +00:00
libpixelflinger resolved conflicts for cf676a86 to lmp-mr1-ub-dev 2015-09-19 16:13:00 -07:00
libprocessgroup processgroup: change the polling interval for killProcessGroup() 2015-06-16 13:59:32 -07:00
libsparse libsparse: move_chunks_up_to_len() does not account skip chunks 2015-04-08 10:10:17 +02:00
libsuspend Adds a parameter to the wakeup_callback to report sucessful wakeup or suspend aborts. 2015-06-25 13:15:22 -07:00
libsync Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
libsysutils Fix incorrectly sized buffer. 2015-07-28 17:56:06 +09:00
libusbhost libusbhost: Fix problem reading USB string descriptors on some quirky devices 2015-06-18 13:38:31 -07:00
libutils resolved conflicts for 832a0d1c to mnc-dev 2015-09-19 17:29:42 -07:00
libziparchive Add |optional_suffix| to StartIteration() 2015-06-23 17:31:16 -07:00
lmkd Lmkd: Fix unused variables 2014-11-24 20:32:42 -08:00
logcat liblog: logd: support logd.timestamp = monotonic 2015-11-16 08:53:51 -08:00
logd logd: klogd: parse error 2015-11-16 12:48:58 -08:00
logwrapper Put in line breaks when logging to klog 2015-02-03 17:06:33 +00:00
mkbootimg Merge changes Iac33dbaa,I18fcd37d into mnc-dev 2015-05-08 15:00:14 +00:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir resolve merge conflicts of 6eee56ccab to mnc-dr2-dev. 2015-11-18 16:21:39 -08:00
run-as Extend run-as with optional --user argument. 2015-06-10 12:09:10 -07:00
sdcard Protect runtime storage mount points. 2015-08-06 11:45:31 -07:00
toolbox Revert "Switch to toybox ls." 2015-05-15 23:31:08 -07:00
tzdatacheck Executable to run on boot that removes old tzdata if needed 2015-04-13 11:38:32 +01:00
.gitignore Don't compile abort_socket.c for host targets. It is only intended to run on Linux targets. 2009-05-26 13:23:23 -07:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add a CleanSpec for grep/toolbox. 2015-03-22 18:04:54 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00