modules_do is called without Module_lock

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: 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)

            Assignee:
            Calvin Cheung (Inactive)
            Reporter:
            Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: