summaryrefslogtreecommitdiff
path: root/libnativeloader/library_namespaces.cpp
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2019-10-18 14:41:54 +0100
committerVladimir Marko <vmarko@google.com>2019-10-21 09:24:58 +0000
commite41eec3b193d594577cbe8afc7c3dc6608c2f201 (patch)
treea9914bbb64b8fc87a90ccf165368b6b33475322f /libnativeloader/library_namespaces.cpp
parent98e97c6953e970ce99e53640c963fa79a525b1eb (diff)
Fix deadlock in ThreadList::RunCheckpoint().
Be smarter about the situation when a thread races the suspend request to become Runnable. In that case we try to reschedule the checkpoint on that thread and, if successful, we clear the suspend request. Thus we never have to wait for a Runnable thread to become suspended. This avoids a deadlock where the ThreadList::RunCheckpoint() was waiting for a Runnable thread which was waiting for the GC to allow weak ref access while the GC thread was actually suspended by the suspend request, trying to become Runnable. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit --interpreter Bug: 138852758 Change-Id: I746b00160e09ac9e55ee6214faee6447025615b9
Diffstat (limited to 'libnativeloader/library_namespaces.cpp')
0 files changed, 0 insertions, 0 deletions