This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206672 - VM warning: CodeCache is full. Compiler has been disabled.
Summary: VM warning: CodeCache is full. Compiler has been disabled.
Status: RESOLVED INVALID
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 7.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
: 196424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-23 15:20 UTC by Egor Ushakov
Modified: 2012-11-05 17:50 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2011-12-23 15:20:30 UTC
Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: SunOS version 5.11 running on x86; UTF-8; en_US (nb)

After some time I get this warning in the console:

Java HotSpot(TM) Client VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) Client VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=

how much should I set?
Comment 1 Tomas Zezula 2012-01-02 08:01:36 UTC
The default value is 32m, for 64bit VM 48m.
Comment 2 Antonin Nebuzelsky 2012-01-23 10:23:37 UTC
Did you specify any extra JVM parameters to reach the state of full CodeCache? Some comments on the internet indicate this happens if you specify too low "-XX:CompileThreshold" and too much bytecode gets compiled by HotSpot very early.

I don't think we should override the JVM default value with the "-XX" option in netbeans.conf file unless more users run into the problem. Your report seems to be the only one.
Comment 3 Antonin Nebuzelsky 2012-01-23 10:37:13 UTC
*** Bug 196424 has been marked as a duplicate of this bug. ***
Comment 4 Tomas Zezula 2012-01-23 10:37:43 UTC
I've already seen such a report when IDE overreach the standard hs code cache size.
As far as I know not all VMs are printing this message, in some versions hs just stops to do
just in time compilation without printing anything.
Comment 5 Egor Ushakov 2012-01-23 11:36:10 UTC
I have not changed any memory settings, and have seen this warning on Windows also. Is there any kind of extra info I can provide?
Comment 6 Antonin Nebuzelsky 2012-01-23 12:12:51 UTC
Anything you consider specific about your work with the IDE? Possibly reproducible steps? How long it takes after the IDE start to encounter the problem?
Comment 7 Egor Ushakov 2012-01-23 12:14:51 UTC
Nothing is particular, I just open many NB projects with different NB platforms
Comment 8 Antonin Nebuzelsky 2012-01-26 14:18:22 UTC
Reopening to keep track of the problem.
Comment 9 _ tboudreau 2012-02-22 01:47:05 UTC
Just ran into this as well (IDE was frozen), after running for several days.

Is there any way to find out what is in the code cache?  I could imagine things like dynamic proxies slowly filling it with junk;  are things dumped from it when classes are unloaded?  For things with their own classloaders (i.e. repeatedly running maven or ant), does this cause junk to be created and permanently stored there?


Java HotSpot(TM) Client VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) Client VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
Code Cache  [0xb4a34000, 0xb69bc000, 0xb6a34000)
 total_blobs=15360 nmethods=15018 adapters=272 free_code_cache=557Kb largest_free_block=511680

java -version:
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)

my netbeans_default_options:
netbeans_default_options="-J-Dnb.cellrenderer.fixedheight=17 
-J-Dnetbeans.winsys.statusLine.in.menuBar=true 
-J-Dswing.aatext=true 
-J-Dawt.useSystemAAFontSettings=lcd 
--laf javax.swing.plaf.metal.MetalLookAndFeel
-J-Dnetbeans.logger.console=true 
-J-Xverify:none 
-J-XX:+UseConcMarkSweepGC 
-J-XX:+CMSClassUnloadingEnabled 
-J-XX:+CMSPermGenSweepingEnabled
-J-client 
-J-Xmx786M 
-J-Xss2m 
-J-Xms32m 
-J-XX:PermSize=43m 
-J-XX:MaxPermSize=200m 
-J-ea"
Comment 10 fabriziogiudici 2012-05-17 15:32:07 UTC
Just seen in NetBeans 7.1.1, Linux, on a customer desk. NetBeans was running for no longer than two hours, regular use, default configuration.

Product Version: NetBeans IDE 7.1.1 (Build 201203012225)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35-31-generic running on i386; UTF-8; it_IT (nb)
Comment 11 Tomas Hurka 2012-06-11 08:29:47 UTC
"CodeCache is full. Compiler has been disabled." is just JVM warning. It does not affect JVM functionality. The only drawback is that JVM stops to compile bytecode to native. The cache can be increased using '-XX:ReservedCodeCacheSize=' commandline option. The default value is 32m for 32bit JVM, 48m for 64bit VM.
Comment 12 arren 2012-11-05 17:50:14 UTC
https://blogs.atlassian.com/2012/05/codecache-is-full-compiler-has-been-disabled/

NetBeans should enable codecache flushing by default.