-
Bug
-
Resolution: Fixed
-
P2
-
8-shenandoah, 11-shenandoah, 13
-
b06
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8220735 | 12.0.2 | Zhengyu Gu | P2 | Closed | Fixed | b01 |
diff --git a/src/hotspot/share/gc/shared/owstTaskTerminator.cpp b/src/hotspot/share/gc/shared/owstTaskTerminator.cpp
--- a/src/hotspot/share/gc/shared/owstTaskTerminator.cpp
+++ b/src/hotspot/share/gc/shared/owstTaskTerminator.cpp
@@ -59,21 +61,31 @@
if (do_spin_master_work(terminator)) {
assert(_offered_termination == _n_threads, "termination condition");
+ assert(!peek_in_queue_set(), "Precondition");
return true;
} else {
_blocker->lock_without_safepoint_check();
+ // There is possibility that termination is reached between dropping the lock
+ // before returning from do_spin_master() and acquiring lock above.
+ if (_offered_termination == _n_threads) {
+ _blocker->unlock();
+ assert(!peek_in_queue_set(), "Precondition");
+ return true;
+ }
- backported by
-
JDK-8220735 Missing termination check results violation of termination invariant
- Closed
- duplicates
-
JDK-8218005 ParallelTaskTerminator destroyed while apparently active
- Closed
- relates to
-
JDK-8215047 Task terminators do not complete termination in consistent state
- Resolved
-
JDK-8218005 ParallelTaskTerminator destroyed while apparently active
- Closed