Explicitly pin a virtual thread before acquiring the JFR string pool monitor

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 24
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • jfr
    • b13

      Explicitly pin a virtual thread before acquiring the JFR string pool monitor because migrating a carrier thread local event writer object onto another carrier thread is impossible.

      During event commit, the thread is in a critical section because it has loaded a carrier thread local event writer object. For virtual threads, a contended monitor, such as a synchronized block, is a point where a thread could become unmounted.

      A monitor guards the JFR string pool, but remounting a virtual thread onto another carrier is impossible because of the event writer.

      Therefore, it's imperative to use explicit pin constructs to prevent unmounting at this location.

            Assignee:
            Markus Grönlund
            Reporter:
            Markus Grönlund
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: