A suspender is a JvmtiVTMSTransitionDisabler monopolist, meaning VTMS_transition_disable_for_all() should not return while there is any active jvmtiVTMSTransitionDisabler. The code though is checking for active "all-disablers" but it's missing the check for active "single disablers":
if (_is_SR) {
_SR_mode = true;
while (_VTMS_transition_disable_for_all_count > 0) {
ml.wait(10); // Wait while there is any active jvmtiVTMSTransitionDisabler.
}
}
Before 8298853, since there was only one counter we were doing the correct thing:
if (_is_SR) {
_SR_mode = true;
while (_VTMS_transition_disable_count > 0) {
ml.wait(10); // Wait while there is any active jvmtiVTMSTransitionDisabler.
}
}
I attached a simple reproducer that crashes because of this.
if (_is_SR) {
_SR_mode = true;
while (_VTMS_transition_disable_for_all_count > 0) {
ml.wait(10); // Wait while there is any active jvmtiVTMSTransitionDisabler.
}
}
Before 8298853, since there was only one counter we were doing the correct thing:
if (_is_SR) {
_SR_mode = true;
while (_VTMS_transition_disable_count > 0) {
ml.wait(10); // Wait while there is any active jvmtiVTMSTransitionDisabler.
}
}
I attached a simple reproducer that crashes because of this.