In doing the cleanup associated with JDK-8194085 we left in place a check that detects failure to reach a safepoint.
Old code:
if (SafepointMechanism::uses_global_page_poll() && int(iterations) == DeferPollingPageLoopCount) {
guarantee (PageArmed == 0, "invariant") ;
PageArmed = 1 ;
os::make_polling_page_unreadable();
}
New code:
if (int(iterations) == -1) { // overflow - something is wrong.
// We can only overflow here when we are using global
// polling pages. We keep this guarantee in its original
// form so that searches of the bug database for this
// failure mode find the right bugs.
guarantee (PageArmed == 0, "invariant");
}
To maintain the existing behaviour the above should have kept the full condition:
if (SafepointMechanism::uses_global_page_poll() && int(iterations) == -1)
But Dan then raised the question as to what happens when we are not using the global polling page:
1) is it possible to overflow iterations when not using global polling pages?
2) should we fail a guarantee if that happens?
We do need to check how handshake based safepoint polling responds in cases where we would fail the guarantee and if we can get stuck and need to detect the problem as we do for the global poll page.
Old code:
if (SafepointMechanism::uses_global_page_poll() && int(iterations) == DeferPollingPageLoopCount) {
guarantee (PageArmed == 0, "invariant") ;
PageArmed = 1 ;
os::make_polling_page_unreadable();
}
New code:
if (int(iterations) == -1) { // overflow - something is wrong.
// We can only overflow here when we are using global
// polling pages. We keep this guarantee in its original
// form so that searches of the bug database for this
// failure mode find the right bugs.
guarantee (PageArmed == 0, "invariant");
}
To maintain the existing behaviour the above should have kept the full condition:
if (SafepointMechanism::uses_global_page_poll() && int(iterations) == -1)
But Dan then raised the question as to what happens when we are not using the global polling page:
1) is it possible to overflow iterations when not using global polling pages?
2) should we fail a guarantee if that happens?
We do need to check how handshake based safepoint polling responds in cases where we would fail the guarantee and if we can get stuck and need to detect the problem as we do for the global poll page.
- duplicates
-
JDK-8191093 Improve behavior when safepoint begin times out
- Closed
- is blocked by
-
JDK-8242088 Replace mutually exclusive lists with concurrent alternatives
- Resolved
- relates to
-
JDK-8191093 Improve behavior when safepoint begin times out
- Closed
-
JDK-8220051 Remove global safepoint code
- Resolved
-
JDK-8253794 TestAbortVMOnSafepointTimeout never timeouts
- Resolved
-
JDK-8194085 Obsolete the deprecated SafepointSynchronize flags and remove related code
- Resolved
-
JDK-8239024 Kitchensink24HStress.java failed due to timeout
- Resolved
(2 relates to)