-
Bug
-
Resolution: Fixed
-
P4
-
repo-leyden
We have few crashes in out testing in MutexLockerImpl::name2id().
It increments _num_names before storing name into _names[new_id]. As result first loop may access _names[I] which is modified by other thread.
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffdac6e3030, pid=29128, tid=87612
# Problematic frame:
# V [jvm.dll+0xdd3030] MutexLockerImpl::name2id+0x60
Stack: [0x0000008a19900000,0x0000008a19a00000], sp=0x0000008a199fe000, free space=1016k
Native frames: (J=compiled Java code, A=AOT compiled, P=AOT preloaded, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0xdd3030] MutexLockerImpl::name2id+0x60 (mutexLocker.cpp:472)
V [jvm.dll+0xdcd6ff] Mutex::Mutex+0x6f (mutex.cpp:293)
V [jvm.dll+0xd97e50] MethodData::extra_data_lock+0x60 (methodData.cpp:1866)
V [jvm.dll+0x54b284] ciMethodData::load_remaining_extra_data+0x24 (ciMethodData.cpp:145)
V [jvm.dll+0x54b036] ciMethodData::load_data+0x336 (ciMethodData.cpp:287)
V [jvm.dll+0x540ee3] ciMethod::ensure_method_data+0x183 (ciMethod.cpp:1055)
V [jvm.dll+0x3ed5ae] Compilation::compile_java_method+0xde (c1_Compilation.cpp:386)
It increments _num_names before storing name into _names[new_id]. As result first loop may access _names[I] which is modified by other thread.
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffdac6e3030, pid=29128, tid=87612
# Problematic frame:
# V [jvm.dll+0xdd3030] MutexLockerImpl::name2id+0x60
Stack: [0x0000008a19900000,0x0000008a19a00000], sp=0x0000008a199fe000, free space=1016k
Native frames: (J=compiled Java code, A=AOT compiled, P=AOT preloaded, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0xdd3030] MutexLockerImpl::name2id+0x60 (mutexLocker.cpp:472)
V [jvm.dll+0xdcd6ff] Mutex::Mutex+0x6f (mutex.cpp:293)
V [jvm.dll+0xd97e50] MethodData::extra_data_lock+0x60 (methodData.cpp:1866)
V [jvm.dll+0x54b284] ciMethodData::load_remaining_extra_data+0x24 (ciMethodData.cpp:145)
V [jvm.dll+0x54b036] ciMethodData::load_data+0x336 (ciMethodData.cpp:287)
V [jvm.dll+0x540ee3] ciMethod::ensure_method_data+0x183 (ciMethod.cpp:1055)
V [jvm.dll+0x3ed5ae] Compilation::compile_java_method+0xde (c1_Compilation.cpp:386)