[11] RFR(XS) 8202075: Crash when running compiler/codecache/OverflowCodeCacheTest.java

Tobias Hartmann tobias.hartmann at oracle.com
Tue Apr 24 13:19:39 UTC 2018


Hi Vladimir,

looks good to me!

Best regards,
Tobias

On 24.04.2018 00:53, Vladimir Kozlov wrote:
> https://bugs.openjdk.java.net/browse/JDK-8202075
> Note, bug is closed because it has some confidential information, but I put all important
> information here in RFR:
> 
> [1.144s][warning][codecache] CodeCache is full. Compiler has been disabled.
> [1.144s][warning][codecache] Try increasing the code cache size using -XX:ReservedCodeCacheSize=
> CodeCache: size=245760Kb used=243996Kb max_used=243996Kb free=1763Kb
>  bounds [0x000000b100000000, 0x000000b10f000000, 0x000000b10f000000]
>  total_blobs=1173 nmethods=77 adapters=840
>  compilation: disabled (not enough contiguous free space left)
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffb0bdfadf3, pid=4624, tid=1984
> #
> # JRE version: Java(TM) SE Runtime Environment (11.0) (fastdebug build 11-internal+0)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 11-internal+0-2018-04-20-0015354, mixed
> mode, tiered, compressed oops, g1 gc, windows-amd64)
> # Problematic frame:
> # V  [jvm.dll+0x4eadf3]  CodeBlob::CodeBlob+0x23
> 
> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native
> code)
> V  [libjvm.dylib+0x3babda]  RuntimeBlob::RuntimeBlob(char const*, int, int, int, int)+0x28
> V  [libjvm.dylib+0x3bb09e]  BufferBlob::BufferBlob(char const*, int)+0x20
> V  [libjvm.dylib+0xc4a779]  WhiteBox::allocate_code_blob(int, int)+0x9b
> V  [libjvm.dylib+0xc4a9d7]  WB_AllocateCodeBlob+0x23c
> j  sun.hotspot.WhiteBox.allocateCodeBlob(II)J+0
> 
> 
> We start testing new C++ compilers (VS and Xcode/clang) and this test crashed in CodeBlob()
> constructor because, it seems, new compilers don't generate NULL check anymore. We have to add
> missing check:
> 
> diff -r af4b57a556be src/hotspot/share/prims/whitebox.cpp
> --- a/src/hotspot/share/prims/whitebox.cpp
> +++ b/src/hotspot/share/prims/whitebox.cpp
> @@ -1359,7 +1359,9 @@
>    {
>      MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
>      blob = (BufferBlob*) CodeCache::allocate(full_size, blob_type);
> -    ::new (blob) BufferBlob("WB::DummyBlob", full_size);
> +    if (blob != NULL) {
> +      ::new (blob) BufferBlob("WB::DummyBlob", full_size);
> +    }
>    }
>    // Track memory usage statistic after releasing CodeCache_lock
>    MemoryService::track_code_cache_memory_usage();
> 
> 
> Normal testing and testing with new C++ compilers.
> 


More information about the hotspot-dev mailing list