RFR (XS): JDK-8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)

Christian Thalinger christian.thalinger at oracle.com
Wed May 15 14:55:50 PDT 2013


On May 15, 2013, at 2:49 AM, Albert Noll <albert.noll at oracle.com> wrote:

> Hi,
> 
> thank you for reviewing!
> 
> Best,
> Albert
> 
> jbs: https://jbs.oracle.com/bugs/browse/JDK-8014430
> webrev: http://cr.openjdk.java.net/~anoll/8014430/webrev.00/
> 
> Problem: VM failed with the following error message when the specified code cache
> specified by -XX:ReservedCodeCacheSize=... is too small to startup the VM.
> 
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (c1_Compiler.cpp:87), pid=25077, tid=3856251760
> #  guarantee(blob != NULL) failed: must create initial code buffer
> #
> # JRE version: Java(TM) SE Runtime Environment (8.0-b89) (build 1.8.0-ea-b89)
> # Java VM: Java HotSpot(TM) Client VM (25.0-b31 mixed mode linux-x86 )
> # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
> #
> # If you would like to submit a bug report, please visit:
> #   http://bugreport.sun.com/bugreport/crash.jsp
> #
> 
> Solution: replace guarantee() with  vm_exit_out_of_memory() to provide a
> graceful shutdown of the VM if the specified size for the code cache is too small
> to startup the VM. The error message is now as follows:

I don't think that's the requested fix.  If C1 isn't able to allocate its temporary buffers the compiler should be turned off instead of exiting the VM.  We can print a warning saying that the compiler was turned off and increasing ReservedCodeCacheSize fixed that but we shouldn't exit.

-- Chris

> 
> anoll at anoll-ThinkPad-T430:/export/anoll/test$ /export/anoll/jdk_export-32bit/jdk1.8.0/bin/java -client -XX:InitialCodeCacheSize=500k -XX:ReservedCodeCacheSize=1m MultipleClassLoaderCCFiller
> #
> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (malloc) failed to allocate 288358 bytes for Compiler1 temporary CodeBuffer.
> # Try to increase -XX:ReservedCodeCacheSize=.
> 
> # An error report file with more information is saved as:
> # /export/anoll/test/hs_err_pid22080.log
> #
> # Compiler replay data is saved as:
> # /export/anoll/test/replay_pid22080.log
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130515/b4014eb8/attachment.html 


More information about the hotspot-compiler-dev mailing list