diff options
author | 2023-12-19 20:35:24 +0000 | |
---|---|---|
committer | 2023-12-20 10:14:19 +0000 | |
commit | 17195424dd56070a773e82ab5430c788e54a78c6 (patch) | |
tree | bbec51d0943d516ded7928fbdb6f9618282ea694 /runtime/debugger.cc | |
parent | c0a7565637b4513f312da0015fc59b8dc83aeb34 (diff) |
Revert^18 "Thread suspension cleanup and deadlock fix"
This reverts commit 8bc6a58df7046b4d6f4b51eb274c7e60fea396ff.
PS1 is identical to
https://android-review.git.corp.google.com/c/platform/art/+/2746640
PS2 makes the following changes:
- Remove one DCHECK each from the two WaitForFlipFunction variants.
The DCHECK could fail if another GC was started in the interim.
- Break up the WaitForSuspendBarrier timeout into shorter ones.
so we don't time out as easily if our process is frozen.
- Include the thread name for ThreadSuspendByThreadIdWarning, since
we don't get complete tombstones for some failures.
Test: Treehugger, host tests.
Bug: 240742796
Bug: 203363895
Bug: 238032384
Bug: 253671779
Bug: 276660630
Bug: 295880862
Bug: 294334417
Bug: 301090887
Bug: 313347640
(and more)
Change-Id: I12c5c01b1e006baab4ee4148aadbc721723fb89e
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r-- | runtime/debugger.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 9b0f49fb9e..e5535156c1 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -340,7 +340,11 @@ void Dbg::DdmSetThreadNotification(bool enable) { Dbg::DdmSendThreadNotification(thread, CHUNK_TYPE("THCR")); finish_barrier.Pass(cls_self); }); - size_t checkpoints = Runtime::Current()->GetThreadList()->RunCheckpoint(&fc); + // TODO(b/253671779): The above eventually results in calls to EventHandler::DispatchEvent, + // which does a ScopedThreadStateChange, which amounts to a thread state change inside the + // checkpoint run method. Hence the normal check would fail, and thus we specify Unchecked + // here. + size_t checkpoints = Runtime::Current()->GetThreadList()->RunCheckpointUnchecked(&fc); ScopedThreadSuspension sts(self, ThreadState::kWaitingForCheckPointsToRun); finish_barrier.Increment(self, checkpoints); } |