Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8259526

"Reference Handler" idle thread has misleading thread state

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 17
    • core-svc
    • None

      I noticed a small usability regression apparently introduced by JDK-8156500.
      When the ReferenceHandler thread is idle (i.e. almost always) its stack trace misleadingly suggests it is RUNNABLE

      "Reference Handler" daemon prio=10 Id=2 RUNNABLE
      at java.base@14-ea/java.lang.ref.Reference.waitForReferencePendingList(Native Method)
      at java.base@14-ea/java.lang.ref.Reference.processPendingReferences(Reference.java:241)
      at java.base@14-ea/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:213)

      it would be nice if the user-visible java thread state and lock info was the same as if it was blocked inside Object.wait, giving stack traces something like

      "Reference Handler" daemon prio=10 Id=2 WAITING on VM heap lock

      which would make "dump all threads" output less confusing.

            Unassigned Unassigned
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: