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

More Monitor/mutex initialization management

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      JDK-8213137 dealt with the issue of Mutex/monitor instances initialized through C++ static initializers, by moving them to the global set of mutexes/monitors managed by MutexLocker. But there are still Mutex/Monitor instances embedded in other classes whose initialization may be problematic.

      In particular on Solaris we have a problem. The NMT _query_lock is created during VM argument parsing, which is after os::init(), but on Solaris os::solaris::synchronization_init() is called from os::init_2() which is after argument parsing - because sync init on Solaris depends on the arguments: UseLWPSynchronization and UsePthreads.

      An assert needs to be added to ensure we don't accidentally initialize other instances too early.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dholmes David Holmes
                Reporter:
                dholmes David Holmes
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: