No description
Find a file
Josh Gao c531ed6648 debuggerd_fallback: fix race.
A race condition occurs when one thread takes more than a second to get
scheduled to handle the signal we send to ask it to dump its stack.
When this happens, the main thread will continue on, close the fd, and
then ask the next thread to dump, but the slow thread will then wake up
and try to write to the new thread's fd, or trigger an assertion in
__linker_enable_fallback_allocator.

Do a few things to make this less bad:
  - encode both target tid and fd in the shared atomic, so that we know
    who each fd is for
  - switch __linker_enable_fallback_allocator to return success instead
    of aborting, and bail out if it's already in use
  - write to the output fd right when we get to it, instead of doing it
    whenever the dumping code decides to, to reduce the likelihood that
    the timeout expires

Test: debuggerd_test
Change-Id: Ife0f6dae388b601e7f991605f14d7a0274013f6b
2018-02-09 15:35:40 -08:00
adb Merge "adb: switch asocket::enqueue to std::string." 2018-02-08 01:06:22 +00:00
adf Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
base base: adb.exe build error 2018-02-05 09:33:10 -08:00
bootstat bootstat: Add more boot reasons. 2018-01-26 14:31:04 -08:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd debuggerd_fallback: fix race. 2018-02-09 15:35:40 -08:00
demangle Add OWNERS. 2017-12-07 13:30:03 -08:00
fastboot Merge "Fix fastboot memory corruption." 2018-01-19 22:39:14 +00:00
fs_mgr Use vold's mount with metadata encryption service. 2018-02-01 14:54:04 -08:00
gatekeeperd resolve merge conflicts of 0dd4b6aa3 to stage-aosp-master 2017-09-15 16:50:34 +09:00
healthd healthd: don't report fake data for battery-less devices 2018-02-05 19:48:30 +00:00
include Move android_filesystem_config.h => fs_config.h 2017-08-02 16:31:19 -07:00
init Add support for non-partitioned devices for system 2018-02-06 06:34:40 +00:00
libappfuse Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
libasyncio Use -Werror in system/core 2017-11-01 11:32:55 -07:00
libbacktrace Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
libbinderwrapper libbinderwrapper: Android.mk -> Android.bp 2017-04-25 15:55:26 -07:00
libcrypto_utils Mark the modules as VNDK in Android.bp 2017-09-14 08:35:16 +00:00
libcutils Merge "Revert "Don't initialize atrace if it's already disabled."" 2018-02-08 17:27:41 +00:00
libdiskconfig Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]] 2017-10-02 10:44:29 -07:00
libgrallocusage Use -Werror in system/core 2017-11-01 11:32:55 -07:00
libion Merge "libion: Adapt to new ION interface" 2017-09-21 01:06:32 +00:00
libkeyutils Add libkeyutils. 2017-05-10 10:40:11 -07:00
liblog Doxygen format <android/log.h>. 2018-01-26 10:57:57 -08:00
libmemtrack Add OWNERS. 2017-12-07 13:30:03 -08:00
libmemunreachable Add explanation for clone use 2018-02-08 15:07:47 -08:00
libmetricslogger Add OWNERS. 2017-12-07 13:30:03 -08:00
libnativebridge Add OWNERS. 2017-12-07 13:30:03 -08:00
libnativeloader Don't shared oem-defined libs to vendor apks 2018-01-15 22:08:21 +09:00
libnetutils Add OWNERS. 2017-12-07 13:30:03 -08:00
libpackagelistparser Use -Werror in system/core 2017-11-01 11:32:55 -07:00
libpixelflinger MIPS[64]: codeflinger: Fix build due to unused variable warnings 2017-11-06 16:38:49 +01:00
libprocessgroup Add memcg related configs to init. 2017-07-18 15:58:40 -07:00
libprocinfo Add OWNERS. 2017-12-07 13:30:03 -08:00
libqtaguid Redirect qtaguid native call to netd fwmark client 2017-11-09 18:02:22 -08:00
libsparse Merge "<stdbool.h> not necessary in C++." 2017-10-17 19:26:53 +00:00
libsuspend Add force_suspend function 2018-01-19 12:30:39 -08:00
libsync Merge "libsync: Add fence info tests" 2017-09-26 23:46:32 +00:00
libsystem Add a graphics owner for graphics.h. 2018-01-24 11:08:54 -08:00
libsysutils Don't complain that the DNSSL RA option is "unknown". 2017-11-28 06:42:04 +00:00
libunwindstack Expose per arch headers. 2018-02-08 19:29:08 -08:00
libusbhost usblib: usb_device_get_string decoding fixes. 2017-12-19 22:20:51 +00:00
libutils libutilscallstack is private VNDK-SP 2018-01-25 14:02:08 +09:00
libvndksupport Add OWNERS. 2017-12-07 13:30:03 -08:00
libziparchive zip_archive: Fix a few more badly written tests. 2017-12-27 09:42:00 +00:00
lmkd lmkd: use after free 2018-02-05 11:00:59 -08:00
logcat Add OWNERS. 2017-12-07 13:30:03 -08:00
logd Merge "Use ro.logd.kernel for kernel logcat" 2018-01-16 18:24:08 +00:00
logwrapper Add OWNERS. 2017-12-07 13:30:03 -08:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
property_service Introduce property types 2018-01-16 14:44:40 -08:00
qemu_pipe Add OWNERS. 2017-12-07 13:30:03 -08:00
reboot reboot: only pause indefinitely for non-shutdown operations 2017-09-29 16:29:52 +00:00
rootdir Rename namespace configuration source files. 2018-02-08 08:46:59 +09:00
run-as run-as: Keep supplementary groups. 2017-09-29 15:34:23 -04:00
sdcard Remove FUSE logic; it's only a sdcardfs wrapper. 2018-01-12 15:41:55 -07:00
shell_and_utilities Reland: Add getprop to toolbox 2018-01-10 11:26:24 -08:00
storaged Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
toolbox Build toolbox with _FILE_OFFSET_BITS=64. 2018-01-22 16:15:55 -08:00
trusty Use correct format specifier 2017-12-27 13:42:49 -08:00
usbd Fix selinux denials for usbd 2018-01-24 00:24:49 +00:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk
CleanSpec.mk Add VNDK version for namespace configuration files 2017-12-13 10:31:04 +09: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
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00