Skip to content

Commit b7e0e10

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Fix hang in mutator slot stealing when no waiters have a timeout.
TEST=vm/dart/isolates/many_isolates_blocked_at_process_run_sync_test Change-Id: I9d5f300c91ecfeb798f467d5624ada3baa3fb453 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427306 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 722929d commit b7e0e10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

runtime/vm/isolate.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ void IsolateGroup::IncreaseMutatorCount(Thread* thread,
638638
// does not do a NotifyAll to prevent the case of thousands of threads
639639
// waking up to claim a ~dozen slots, so we keep notifying while there are
640640
// both available slots and waiters.
641-
if ((active_mutators_ != max_active_mutators_) && (waiting_mutators_ > 0)) {
641+
if ((waiting_mutators_ > 0) &&
642+
((!has_timeout_waiter_) ||
643+
(active_mutators_ != max_active_mutators_))) {
642644
ml.Notify();
643645
}
644646
}

0 commit comments

Comments
 (0)