diff options
| author | Mathieu Chartier <mathieuc@google.com> | 2016-03-10 10:49:35 -0800 |
|---|---|---|
| committer | Mathieu Chartier <mathieuc@google.com> | 2016-03-10 12:07:48 -0800 |
| commit | 3a84e31b247f0c7b6c31946f15def732d556282c (patch) | |
| tree | 2be7005fd90cfb2267926e31b858dae3256bdc01 /test/MultiDexModifiedSecondary/main.jpp | |
| parent | d0562a324d9eb56f69b967f1c4da03019026ff33 (diff) | |
Allocate interrupted exception before re-acquiring lock
Allocating the monitor exception after acquiring the lock can cause
a deadlock in the following scenario:
Reference queue daemon interrupted from wait() on
ReferenceQueue.class. Tries to allocate exception and starts a GC
that blocks on WaitForGcToComplete.
Some other thread is already doing a GC, and tries to enqueue the
cleared refereneces. This deadlocks trying to lock Reference.class
in ReferenceQueue.add.
Bug: 27508829
(cherry picked from commit daed5d81e2fdb9d1e03ee6c34567347b92dcfb22)
Change-Id: Ibdc2769077976545385d8c6ecc5bf26316eb70a1
Diffstat (limited to 'test/MultiDexModifiedSecondary/main.jpp')
0 files changed, 0 insertions, 0 deletions
