Below is a review comment (see JDK-8311218) from Alan:
src/hotspot/share/runtime/javaThread.hpp line 652:
> 651: bool is_disable_suspend() const { return _is_disable_suspend; }
> 652: void toggle_is_disable_suspend() { _is_disable_suspend = !_is_disable_suspend; };
Looking at this again then I don't think it can be a bit that is toggled on and off will work. Consider the case where several threads attempt to poll the state of a virtual Thread with Thread::getState at the same time. This can't work without an atomic counter and further coordination. So I think further work is required on this issue.
src/hotspot/share/runtime/javaThread.hpp line 652:
> 651: bool is_disable_suspend() const { return _is_disable_suspend; }
> 652: void toggle_is_disable_suspend() { _is_disable_suspend = !_is_disable_suspend; };
Looking at this again then I don't think it can be a bit that is toggled on and off will work. Consider the case where several threads attempt to poll the state of a virtual Thread with Thread::getState at the same time. This can't work without an atomic counter and further coordination. So I think further work is required on this issue.
- relates to
-
JDK-8311218 fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable
-
- Resolved
-