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

NMT: Cleanup ThreadStackTracker

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 15-pool, 17-pool, 18
    • Fix Version/s: 18
    • Component/s: hotspot

      Description

      1) Following assertion:
        assert(MemTracker::tracking_level() >= NMT_summary, "Must be");
      in ThreadStackTracker::record/release_thread_stack() is unreliable. The full fence after downgrading tracking level is *not* sufficient to avoid the racy.

      2) NMT tracking level is downgraded without ThreadCritical lock held. But, it does require ThreadCritical lock to be held when it actually downgrade internal tracking data structure, so checking internal state is reliable to determine current tracking state.
      Add assertion to ensure correct tracking state

      3) thread counter is updated with ThreadCritical lock, but is read without the lock. Change to atomic update to ensure reader will not read stale value.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zgu Zhengyu Gu
              Reporter:
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: