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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: