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

More Monitor/mutex initialization management

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • hotspot
    • None
    • b21

      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.

            dholmes David Holmes
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: