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

modules_do is called without Module_lock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b17

      ClassLoaderExt::process_module_table() calls modules_do() which iterates over the ModuleEntryTable without holding Module_lock.
      The ModuleEntryTable is not a lock free table as entries can be deleted by concurrent class unloading.

      Adding a lock doesn't work because we transition to Native to open a zip file:
      V [jvm.dll+0x4f283a] ThreadToNativeFromVM::ThreadToNativeFromVM+0x4a (interfaceSupport.inline.hpp:182)
      V [jvm.dll+0x4f33df] ClassLoader::create_class_path_entry+0x7f (classLoader.cpp:742)
      V [jvm.dll+0x4f76eb] ClassLoader::setup_module_search_path+0xcb (classLoader.cpp:560)
      V [jvm.dll+0xbf13fe] ModuleEntryTable::modules_do+0x5e (moduleEntry.cpp:696)

            ccheung Calvin Cheung
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: