From 8bc6a58df7046b4d6f4b51eb274c7e60fea396ff Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Tue, 19 Dec 2023 18:48:15 +0000 Subject: Revert^17 "Thread suspension cleanup and deadlock fix" This reverts commit c6371b52df0da31acc174a3526274417b7aac0a7. Reason for revert: This seems to have two remaining issues: 1. The second DCHECK in WaitForFlipFunction is not completely guaranteed to hold, resulting in failures for 658-fp-read-barrier. 2. WaitForSuspendBarrier seems to time out occasionally, possibly spuriously so. We fail when the futex times out once. That's probably incompatible with the app freezer. We should retry a few times. Change-Id: Ibd8909b31083fc29e6d4f1fcde003d08eb16fc0a --- runtime/debugger.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'runtime/debugger.cc') diff --git a/runtime/debugger.cc b/runtime/debugger.cc index e5535156c1..9b0f49fb9e 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -340,11 +340,7 @@ void Dbg::DdmSetThreadNotification(bool enable) { Dbg::DdmSendThreadNotification(thread, CHUNK_TYPE("THCR")); finish_barrier.Pass(cls_self); }); - // 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); + size_t checkpoints = Runtime::Current()->GetThreadList()->RunCheckpoint(&fc); ScopedThreadSuspension sts(self, ThreadState::kWaitingForCheckPointsToRun); finish_barrier.Increment(self, checkpoints); } -- cgit v1.2.3-59-g8ed1b