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

NMT: Cleanup ThreadStackTracker

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 18
    • 15-pool, 17-pool, 18
    • hotspot

      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.

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

              Created:
              Updated:
              Resolved: