Details
-
Bug
-
Resolution: Fixed
-
P4
-
8-shenandoah, 11-shenandoah, 12, 13
-
b06
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8220736 | 12.0.2 | Zhengyu Gu | P4 | Resolved | Fixed | b01 |
Description
Newly upstreamed OWST task terminator has a rare race window that results it to terminate in bad state.
When termination carries TerminatorTerminator, and its decision (TerminatorTerminator::should_exit_termination) depends on external condition, the race window could result some workers see "succeeded termination", while others see "aborted termination". The workers see "succeeded termination" do not decrease _offered_termination count, while the others, who see "aborted termination", do, that leaves 0 < _offered_termination < _n_threads.
The inconsistent state is due to spin master detecting termination condition outside lock.
This bug is not fatal in any means, since when TerminatorTerminator::should_exit_termination() returns true, it usually means to abort the termination, but it can trigger assertion failure in reset_for_reuse() method.
We did not encounter this bug in Shenandoah for so long, because we use Terminator as the way it was defined, a stack object, we don't reuse them.
Attachments
Issue Links
- backported by
-
JDK-8220736 Task terminators do not complete termination in consistent state
-
- Resolved
-
- blocks
-
JDK-8216072 Remove TaskTerminator's assignment operator
-
- Resolved
-
- duplicates
-
JDK-8217790 owstTaskTerminator::do_spin_master_work checks termination condition without lock
-
- Closed
-
- is blocked by
-
JDK-8215220 Simplify Shenandoah task termination in aborted paths
-
- Resolved
-
-
JDK-8215299 Remove G1CMTask::should_exit_termination()'s undesirable side-effect
-
- Resolved
-
- relates to
-
JDK-8217794 Missing termination check results violation of termination invariant
-
- Closed
-
-
JDK-8218005 ParallelTaskTerminator destroyed while apparently active
-
- Closed
-
-
JDK-8204947 Port ShenandoahTaskTerminator to mainline and make it default
-
- Resolved
-