JDK-6536662 : win2000 platform only - Could not reserve enough space for object heap to initialize VM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2_13
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2007-03-21
  • Updated: 2010-04-03
  • Resolved: 2008-12-22
Related Reports
Relates :  
Description
This is case 65341881.

This seems to be a regression in 1.4.2 recent releases.
This problem happens only on windows 2000, not even on windows xp.

C:\j2sdk1.4.2_13\bin>java -Xmx1400m -version
Error occurred during initialization of VM
Could not reserve enough space for object heap

C:\j2sdk1.4.2_13\bin>java -Xmx1200m -version
java version "1.4.2_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
b06)
Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)

C:\j2sdk1.4.2_08\bin>java -Xmx1400m -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

C:\j2sdk1.4.2_08\bin>java -Xmx1200m -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.
2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

Yumin has a preliminary evaluation on this issue:

"I tested the binary based on this putback and the binary before this 
putback --- the result showed after CR 4515367, this problem occured. If 
customer filed escalation I could work again on the case to find more 
detail information. Now the only finding is the putback caused this 
change. 5.0 is not haveing this problem."

Comments
SUGGESTED FIX --- init.cpp Thu Apr 5 08:50:30 2007 *************** *** 96,102 **** classLoader_init(); codeCache_init(); icache_init(); - VM_Version_init(); stubRoutines_init1(); carSpace_init(); jint status = universe_init(); // dependent on codeCache_init and stubRoutines_init --- 96,101 ---- *************** *** 103,108 **** --- 102,108 ---- if (status != JNI_OK) return status; + VM_Version_init(); interpreter_init(); // before any methods loaded invocationCounter_init(); // before any methods loaded marksweep_init();
05-04-2007

EVALUATION In bug fix of 4515367 (Exception error handling clean up), in VM_Version_init() stack, there is a call to strdup which duplicates a string in heap, somehow this action led to memory fragmented precedes universe_init() which has the biggest memory chunk allocation request. If change the initialization sequence make universe_init() precedes VM_Version_init(), see "Suggested Fix", the problem would go away.
05-04-2007