RFR: 8253429: Error reporting should report correct state of terminated/aborted threads [v2]

Zhengyu Gu zgu at openjdk.java.net
Wed Sep 30 20:17:46 UTC 2020


> For some non-JavaThread, their object instances can outlast threads' lifespan. For example, we still can query/report
> thread's state after thread terminated.
> But the query/report currently returns wrong state. E.g. a terminated thread appears to be alive and seemly has valid
> thread stack, etc.
> This patch sets non-JavaThread's state to ZOMBIE just before it terminates, so that we can distinguish terminated
> thread from live thread.
> Also, thread should not report its SMR info, if it has terminated or it never started (thread->osthread() == NULL).
> 
> Note: Java thread does not have such issue, its thread object is deleted before thread terminates.

Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:

  Update

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/341/files
  - new: https://git.openjdk.java.net/jdk/pull/341/files/36be40e9..dae7a0de

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=341&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=341&range=00-01

  Stats: 9 lines in 1 file changed: 2 ins; 5 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/341.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/341/head:pull/341

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


More information about the hotspot-runtime-dev mailing list