-
Bug
-
Resolution: Fixed
-
P4
-
10
-
b12
-
generic
-
generic
ThreadsListHandles using the Threads_lock:
1) ThreadsListHandle allows a safepoint to block and allow GCs to run and restructure objects and metadata, iff the ThreadsListHandle is nested. This forced me to review all usages of ThreadsListHandle in great detail to visually verify that it didn't break the surrounding code.
If ThreadsListHandle didn't ever block for safepoints, I wouldn't have had to care about that aspect when reading and reviewing the code. This also means that we in the future runs the risk of someone accidentally adding a nested ThreadsListHandle somewhere where they don't expect a safepoint to happen.
If the lock protecting the threads list could be taken with no_safepoint_check, then the described problem above would completely vanish. Unfortunately, we can't acquire the Threads_lock with no_safepoint_check. A solution to this would be to introduced a low-rank (rank == access) lock, say ThreadsList_lock, and always take it with no_safepoint_check.
That solution would also solve a potential lock-rank problem, we have that ThreadsListHandle can't be used if a higher-rank lock is held.
- duplicates
-
JDK-8198913 Secondary failure in os::print_register_info during error reporting
- Closed
- relates to
-
JDK-8195108 Automate or provide dynamic thread registration for SMR
- Closed
-
JDK-8167108 inconsistent handling of SR_lock can lead to crashes
- Resolved
-
JDK-8222034 Thread-SMR functions should be updated to remove work around
- Resolved
-
JDK-8258284 clean up issues with nested ThreadsListHandles
- Resolved
-
JDK-8198913 Secondary failure in os::print_register_info during error reporting
- Closed
-
JDK-8201592 Fatal error due to illegal safepoint state when compiler thread is writing hs_err-file
- Closed
-
JDK-8202945 OopStorage should use GlobalCounter
- Resolved