JDK-5057818 : codecache full and compiler disabled in bigapps fastdebug run
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-06-04
  • Updated: 2010-01-14
  • Resolved: 2011-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Related Reports
Relates :  
Relates :  
Description
java version:
Java HotSpot(TM) Server VM (build 20040602151820.mingyao.rt_merge-debug, mixed mode)

Test machine: j2se-bigapps-a.west ( 12cpu * 1200MHZ, sunfire E6500)

Problem:
1. in vtest fastdebug run, codecache full and compiler disabled after 2.5 hours
2. in atg fastdebug run, codecache full and compiler disabled in first iteration.

JVM flags used:
-XX:+DeoptimizeALot -XX:+SafepointALot -XX:+UseConcMarkSweepGC

Java HotSpot(TM) Server VM warning: CodeCache is full. Compiler has been disabled.

How to reproduce:
1. use libjvm.so from /net/prt-archiver/export2/archived_workspaces/main/baseline/2004/20040602151820.mingyao.rt_merge
2. export JAVA_HOME=<your java home>
3. run the script
/net/jtgb4u4c.sfbay/export/sail8/bigapps/tests/runatg.ksh -server -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot

or /net/jtgb4u4c.sfbay/export/sail8/bigapps/tests/runvtest.ksh -server
-XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALo

###@###.### 2004-06-04

I checked b54 bigapps log, there is no such warning message in production
run.

The warning message also happened in vmark/vtest fastdebug runs on linux 
platforms.
On jtg-linux3, it happened in vtest run. The flags I used were:
-client -Xcomp -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot
On jtg-linux13, it happened in vmark run. The flags I used were:
-server -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot

So it happened in both C1 and C2 mode.

###@###.### 2004-06-04
Out customers see performance degradation after running for long time which has the same cause.

When an application (for example, AppServer) runs for a long time (days, weeks) it may fill up 
CodeCache and switch off JIT compilation since there are no space left in CodeCache.
After that point new methods will be executed only in Interpreter.

We need to clean up CodeCache more aggressively if that happened.

- Remove not entrant nmethods (OSR) more aggressively.

- Some compiled methods may never be used after application startup or they will be used 
again only occasionally. Such method could be deoptimized and executed in Interpreter.

- Also CodeCache could be compacted (nmethods relocation) to get larger continuous free space.

- Reduce the size of uncommon code (there is fix in work for it already).

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/032260830071
17-12-2009

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
08-07-2004

EVALUATION The problem is that when a method is deoptimized, the memory for any code produced for on-stack-replacement (OSR) compilations is not reclaimed until the class containing the method is unloaded. Normally this creates only a very small memory leak since deoptimizations are infrequent. However when the DeoptimizeALot flag is used, there are many deoptimization. This should be addressed in the 1.6 release. Since it only occurs with the stress option DeoptimizeALot, I am reducing the priority.
08-07-2004