JDK-5079729 : Crash in JavaCalls.cpp Tiger b59
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-07-28
  • Updated: 2007-01-29
  • Resolved: 2004-10-11
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.
Other JDK 6
5.0u2Fixed 6 b07Fixed
Description
I am trying to run GCBAsher with Java2Demo in the same VM using -javaagent. Found this crash on Windows-i586, It is reproduciable.


Steps to reproduce:
/net/jano/export/disk20/GammaBase/Bugs/<BUG>

JAVA_HOME is set
and run the  "run.bat"

# An unexpected error has been detected by HotSpot Virtual Machine:^M
#^M
#  Internal Error (4A41564123414C4C530E4350500016), pid=1016, tid=1652^M
#^M
# Java VM: Java HotSpot(TM) Server VM (1.5.0-beta3-b59 mixed mode)^M

-------

Bug submitter indicates that the proper way to reproduce the bug is:

%JAVA_HOME%/bin/java -server -javaagent:Simple.jar -jar %JAVA_HOME%/demo/jfc/Java2D/Java2Demo.jar -runs=10

###@###.### 2004-08-03

Comments
SUGGESTED FIX ------- systemDictionary.cpp ------- 181a182,183 >#ifndef CORE > assert(!THREAD->is_Compiler_thread(), "Can not load classes with the Compiler thread"); >#endif > ------- ciEnv.cpp ------- 114c114 < klassOop k = SystemDictionary::resolve_or_fail(name, NULL, NULL, true, THREAD); --- > klassOop k = SystemDictionary::find(name, NULL, NULL, THREAD); 116c116 < if (!HAS_PENDING_EXCEPTION) { --- > if (!HAS_PENDING_EXCEPTION && k != NULL) { ###@###.### 10/6/04 15:49 GMT ###@###.### 10/8/04 15:53 GMT
06-10-2004

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
02-10-2004

EVALUATION ###@###.### 2004-08-02 The problem is that - C2 ran out of C heap - In a previous bug, 4916142 CompilerThread0: OutOfMemoryError Chunk::new Out of swap space? we find this note from peter: Now that I look at it again, I wonder if the CompilerThread didn't detect the allocation failure and then try to call JNI_Utils::VMAbortHook(), which might have tried to call out to Java code. ###@###.### 2003-09-03 I think he is correct. - this resulted in the guarantee failure associated with the errorID shown in the description: javaCalls.cpp: 22 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler"); We see this in the hs_err files: Current thread (0x26d18928): JavaThread "CompilerThread0" daemon [_thread_in_vm, id=1652] Stack: [0x26fc0000,0x27000000) [error occurred during error reporting, step 110, id 0xc0000005] Current CompileTask: opto:381 sun.java2d.SunGraphics2D.checkFontInfo(Lsun/java2d/loops/FontInfo;Ljava/awt/Font;)Lsun/java2d/loops/FontInfo; (475 bytes) So, the bug is that the compiler thread is not handling an out of memory properly. Just why the compiler thread is running out of memory is another question to which we don't know the answer. ------------ It is not clear that the compile thread is responsible here. Further investigation needed, but the test case is too contrived to require fixing in Tiger. ###@###.### 2004-08-03 ------- The crash was occuring because the compiler thread was attempting to load a class. get_or_create_exception was attempting to resolve the loading of the symbol, but the method also attempted to load the class if it could not find the symbol. So rather than resolving the symbold, the change finds the symbol which will not load any classes, and instead return NULL. ###@###.### 10/6/04 15:54 GMT
06-10-0004