RFR: 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

Daniel D.Daugherty dcubed at openjdk.java.net
Thu Dec 24 17:43:04 UTC 2020


A small robustness fix in ThreadsSMRSupport::print_info_on() to reduce the
likelihood of crashes during error reporting. Uses Threads_lock->try_lock()
for safety and restricts some reporting to when the Threads_lock has been
acquired (depends on JDK-8256383). Uses a ThreadsListHandle to make
the current ThreadsList safe for reporting (depends on JDK-8258284). Also
detects when the system ThreadsList (_java_thread_list) has changed and
will warn that some of the reported info may now be stale.

Two existing tests have been updated to reflect the use of a ThreadsListHandle
in ThreadsSMRSupport::print_info_on(). Mach5 Tier[1-6] testing has no regressions.

-------------

Commit messages:
 - 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

Changes: https://git.openjdk.java.net/jdk/pull/1891/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1891&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8231627
  Stats: 68 lines in 3 files changed: 39 ins; 5 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1891.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1891/head:pull/1891

PR: https://git.openjdk.java.net/jdk/pull/1891


More information about the serviceability-dev mailing list