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

Refactor loading of zip library to help resolve JDK-8315220

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 22
    • 22
    • hotspot
    • b22

    Description

      JDK-8313251 introduced functionality to have loading of native libraries reported to JFR. The implementation has a problem though, in that taking a JFR stacktrace whilst in _thread_in_native is a broken invariant.

      JDK-8315220 attempted to resolve this problem. Unfortunately it ran into JDK-8315892, and the only quick solution was to backout JDK-8315220, which was done as part of JDK-8315930.

      This problem is also blocking JDK-8315364.

      We can resolve the issue reported in JDK-8315930, by refactoring the loading of the zip library. It involves replacing the Mutex lock, i.e the Zip_lock, used for exclusive access and instead use a semaphore and have all JavaThreads attempting to load the library transition to native. As such, they can wait on this semaphore in native even if the loader thread attempts to transition to VM, potentially inducing a safepoint, when taking a JFR stacktrace.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: