JDK-8003632 : HPROF class file version java.lang.RuntimeException errors
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-11-19
  • Updated: 2016-05-19
  • Resolved: 2012-12-14
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 8
8 b69Fixed
Related Reports
Relates :  
Relates :  
Description
The following nightly tests failed with the below error:

  demo/jvmti/hprof/CpuOldTest.java
  demo/jvmti/hprof/CpuTimesDefineClassTest.java
  demo/jvmti/hprof/CpuTimesTest.java
  demo/jvmti/hprof/HeapAllTest.java
  demo/jvmti/hprof/HeapBinaryFormatTest.java
  demo/jvmti/hprof/HeapDumpTest.java
  demo/jvmti/hprof/HeapSitesTest.java
  demo/jvmti/hprof/OptionsTest.java
  demo/jvmti/hprof/StackMapTableTest.java

command: main HeapBinaryFormatTest HelloWorld
reason: User specified action: run main HeapBinaryFormatTest HelloWorld 
elapsed time (seconds): 5.631
----------System.out:(14/1256)----------
Starting: /export/local/common/jdk/baseline/solaris-i586/jre/bin/java -cp /export/local/125926.JAVASE.NIGHTLY.VM.RT_Baseline.2012-11-16.solaris-i586_javase__client_mixed_JT_JDK_demo_jvmti.runTests/results/workDir/classes/demo/jvmti/hprof -Dtest.classes=/export/local/125926.JAVASE.NIGHTLY.VM.RT_Baseline.2012-11-16.solaris-i586_javase__client_mixed_JT_JDK_demo_jvmti.runTests/results/workDir/classes/demo/jvmti/hprof -Xcheck:jni -Xverify:all -agentlib:hprof=heap=dump,format=b,logflags=4 HelloWorld
HPROF ERROR: CRW ASSERTION FAILURE: (classfileMajorVersion <= JVM_CLASSFILE_MAJOR_VERSION) || ((classfileMajorVersion == JVM_CLASSFILE_MAJOR_VERSION) && (classfileMinorVersion <= JVM_CLASSFILE_MINOR_VERSION)) (java/lang/Object:?:-1) [java_crw_demo.c:2301] [hprof_init.c:210]
HPROF TERMINATED PROCESS
HPROF DUMPING CORE
Exit code is 6
<beginning of Error Stream buffer>
HPROF ERROR: CRW ASSERTION FAILURE: (classfileMajorVersion <= JVM_CLASSFILE_MAJOR_VERSION) || ((classfileMajorVersion == JVM_CLASSFILE_MAJOR_VERSION) && (classfileMinorVersion <= JVM_CLASSFILE_MINOR_VERSION)) (java/lang/Object:?:-1) [java_crw_demo.c:2301] [hprof_init.c:210]
HPROF TERMINATED PROCESS
HPROF DUMPING CORE

<end of buffer>
<beginning of Input Stream buffer>

<end of buffer>
----------System.err:(15/901)----------
java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==6)
	at DemoRun.runit(DemoRun.java)
	at DemoRun.runit(DemoRun.java)
	at HeapBinaryFormatTest.main(HeapBinaryFormatTest.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==6)
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==6)
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==6)


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==6)
Comments
Fix: Update max version to 52
13-12-2012

This needs fixing on the JDK side not hotspot. And I need it fixed in the profiles builds so ...
13-12-2012

This was sort of addressed by JDK-6855180, but it looks like this still results in keeping the classfile version in more than one place. The current place that needs to be fixed for this bug is: jdk/src/share/javavm/export/classfile_constants.h:34:#define JVM_CLASSFILE_MAJOR_VERSION 51 However, we also have hotspot/src/share/vm/classfile/classFileParser.cpp:70:#define JAVA_MAX_SUPPORTED_VERSION 52 Would be nice if the version was only stored in one place.
20-11-2012

First thing I would check is whether the classfile version update to 52 just went into the JDK. Perhaps hprof needs to be updated as well - this might be a simple fix.
20-11-2012

More rules as soon as there are different exit codes in tests below: RULE vm/mlvm/mixed/func/hprof/cpuOld ExitCode any RULE vm/mlvm/mixed/func/hprof/cpuTimes ExitCode any RULE vm/mlvm/mixed/func/hprof/formatB ExitCode any RULE vm/mlvm/mixed/func/hprof/heapAll ExitCode any RULE vm/mlvm/mixed/func/hprof/heapDump ExitCode any RULE vm/mlvm/mixed/func/hprof/heapSites ExitCode any RULE vm/mlvm/mixed/func/hprof/monitor ExitCode any
20-11-2012

On Windows, the exit status is 3. test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==3) These tests also fail because of this issue: Linux fails with exit code 1 RULE nsk/hprof/options/_empty_/empty001 ExitCode 1 RULE nsk/hprof/options/cpu/cpu002 ExitCode 1 RULE nsk/hprof/options/cpu/cpu003 ExitCode 1 RULE nsk/hprof/options/cpu/cpu006 ExitCode 1 RULE nsk/hprof/options/cpu/cpu007 ExitCode 1 RULE nsk/hprof/options/cpu/cpu008 ExitCode 1 RULE nsk/hprof/options/cpu/cpu009 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff001 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff002 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff003 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff004 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff006 ExitCode 1 RULE nsk/hprof/options/cutoff/cutoff007 ExitCode 1 RULE nsk/hprof/options/depth/depth001 ExitCode 1 RULE nsk/hprof/options/depth/depth002 ExitCode 1 RULE nsk/hprof/options/depth/depth003 ExitCode 1 RULE nsk/hprof/options/depth/depth005 ExitCode 1 RULE nsk/hprof/options/depth/depth006 ExitCode 1 RULE nsk/hprof/options/doe/doe001 ExitCode 1 RULE nsk/hprof/options/doe/doe002 ExitCode 1 RULE nsk/hprof/options/doe/doe003 ExitCode 1 RULE nsk/hprof/options/doe/doe005 ExitCode 1 RULE nsk/hprof/options/doe/doe006 ExitCode 1 RULE nsk/hprof/options/doe/doe008 ExitCode 1 RULE nsk/hprof/options/format/format001 ExitCode 1 RULE nsk/hprof/options/format/format002 ExitCode 1 RULE nsk/hprof/options/format/format003 ExitCode 1 RULE nsk/hprof/options/format/format004 ExitCode 1 RULE nsk/hprof/options/heap/heap001 ExitCode 1 RULE nsk/hprof/options/heap/heap002 ExitCode 1 RULE nsk/hprof/options/heap/heap003 ExitCode 1 RULE nsk/hprof/options/lineno/lineno001 ExitCode 1 RULE nsk/hprof/options/lineno/lineno002 ExitCode 1 RULE nsk/hprof/options/lineno/lineno003 ExitCode 1 RULE nsk/hprof/options/lineno/lineno005 ExitCode 1 RULE nsk/hprof/options/lineno/lineno006 ExitCode 1 RULE nsk/hprof/options/monitor/monitor002 ExitCode 1 RULE nsk/hprof/options/monitor/monitor003 ExitCode 1 RULE nsk/hprof/options/monitor/monitor004 ExitCode 1 RULE nsk/hprof/options/monitor/monitor006 ExitCode 1 RULE nsk/hprof/options/monitor/monitor007 ExitCode 1 RULE nsk/hprof/options/thread/thread001 ExitCode 1 RULE nsk/hprof/options/thread/thread002 ExitCode 1 RULE nsk/hprof/options/thread/thread003 ExitCode 1 RULE nsk/hprof/options/thread/thread005 ExitCode 1 RULE nsk/hprof/options/thread/thread006 ExitCode 1 RULE nsk/hprof/options/thread/thread008 ExitCode 1 RULE nsk/hprof/regression/Context/context002 ExitCode 1 RULE nsk/hprof/regression/Context/context003 ExitCode 1 RULE nsk/hprof/regression/Context/context004 ExitCode 1 RULE nsk/hprof/regression/Context/context005 ExitCode 1 RULE nsk/hprof/regression/Context/context006 ExitCode 1 RULE nsk/hprof/regression/Context/context008 ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct02s ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct02t ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct03s ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct03t ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct05s ExitCode 1 RULE nsk/hprof/regression/CrashTest/ct05t ExitCode 1 Windows has ExitCode 3 instead of 1... RULE nsk/hprof/options/_empty_/empty001 ExitCode 3 RULE nsk/hprof/options/cpu/cpu002 ExitCode 3 RULE nsk/hprof/options/cpu/cpu003 ExitCode 3 RULE nsk/hprof/options/cpu/cpu006 ExitCode 3 RULE nsk/hprof/options/cpu/cpu007 ExitCode 3 RULE nsk/hprof/options/cpu/cpu008 ExitCode 3 RULE nsk/hprof/options/cpu/cpu009 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff001 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff002 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff003 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff004 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff006 ExitCode 3 RULE nsk/hprof/options/cutoff/cutoff007 ExitCode 3 RULE nsk/hprof/options/depth/depth001 ExitCode 3 RULE nsk/hprof/options/depth/depth002 ExitCode 3 RULE nsk/hprof/options/depth/depth003 ExitCode 3 RULE nsk/hprof/options/depth/depth005 ExitCode 3 RULE nsk/hprof/options/depth/depth006 ExitCode 3 RULE nsk/hprof/options/doe/doe001 ExitCode 3 RULE nsk/hprof/options/doe/doe002 ExitCode 3 RULE nsk/hprof/options/doe/doe003 ExitCode 3 RULE nsk/hprof/options/doe/doe005 ExitCode 3 RULE nsk/hprof/options/doe/doe006 ExitCode 3 RULE nsk/hprof/options/doe/doe008 ExitCode 3 RULE nsk/hprof/options/format/format001 ExitCode 3 RULE nsk/hprof/options/format/format002 ExitCode 3 RULE nsk/hprof/options/format/format003 ExitCode 3 RULE nsk/hprof/options/format/format004 ExitCode 3 RULE nsk/hprof/options/heap/heap001 ExitCode 3 RULE nsk/hprof/options/heap/heap002 ExitCode 3 RULE nsk/hprof/options/heap/heap003 ExitCode 3 RULE nsk/hprof/options/lineno/lineno001 ExitCode 3 RULE nsk/hprof/options/lineno/lineno002 ExitCode 3 RULE nsk/hprof/options/lineno/lineno003 ExitCode 3 RULE nsk/hprof/options/lineno/lineno005 ExitCode 3 RULE nsk/hprof/options/lineno/lineno006 ExitCode 3 RULE nsk/hprof/options/monitor/monitor002 ExitCode 3 RULE nsk/hprof/options/monitor/monitor003 ExitCode 3 RULE nsk/hprof/options/monitor/monitor004 ExitCode 3 RULE nsk/hprof/options/monitor/monitor006 ExitCode 3 RULE nsk/hprof/options/monitor/monitor007 ExitCode 3 RULE nsk/hprof/options/thread/thread001 ExitCode 3 RULE nsk/hprof/options/thread/thread002 ExitCode 3 RULE nsk/hprof/options/thread/thread003 ExitCode 3 RULE nsk/hprof/options/thread/thread005 ExitCode 3 RULE nsk/hprof/options/thread/thread006 ExitCode 3 RULE nsk/hprof/options/thread/thread008 ExitCode 3 RULE nsk/hprof/regression/Context/context002 ExitCode 3 RULE nsk/hprof/regression/Context/context003 ExitCode 3 RULE nsk/hprof/regression/Context/context004 ExitCode 3 RULE nsk/hprof/regression/Context/context005 ExitCode 3 RULE nsk/hprof/regression/Context/context006 ExitCode 3 RULE nsk/hprof/regression/Context/context008 ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct02s ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct02t ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct03s ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct03t ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct05s ExitCode 3 RULE nsk/hprof/regression/CrashTest/ct05t ExitCode 3 Solaris sometimes fail with ExitCode 6... RULE nsk/hprof/regression/Context/context002 ExitCode 6 RULE nsk/hprof/regression/Context/context003 ExitCode 6 RULE nsk/hprof/regression/Context/context004 ExitCode 6 RULE nsk/hprof/regression/Context/context005 ExitCode 6 RULE nsk/hprof/regression/Context/context006 ExitCode 6 RULE nsk/hprof/regression/Context/context008 ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct02s ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct02t ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct03s ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct03t ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct05s ExitCode 6 RULE nsk/hprof/regression/CrashTest/ct05t ExitCode 6 And some tests use 97 on all platforms. RULE nsk/hprof/options/net/net001 ExitCode 97 RULE nsk/hprof/options/net/net003 ExitCode 97 RULE nsk/regression/b4328316 ExitCode 97
20-11-2012

Regarding the failures as reported in the Description section, the exception has a different failure reason on linux than solaris: test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed - exit return code non-zero (exitStatus==134)
19-11-2012