JDK-8151404 : NSK JVMTI test jvmti/unit/MethodBind/JvmtiTest failure within call to GetMethodDeclaringClass
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9-repo-jigsaw
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-03-07
  • Updated: 2016-03-16
  • Resolved: 2016-03-16
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 9
9-repo-jigsawFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
New test failure within the NSK jvmti colocated tonga test, jvmti/unit/MethodBind/JvmtiTest.  

 nsk.jvmti.unit.MethodBind.JvmtiTest
[2016-03-07T16:33:25.37]
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
[2016-03-07T16:33:25.52] Error: GetMethodDeclaringClass 112
...

Possibly related to early VMStart event work.
Comments
Changeset: ed6046fc103f Author: sspitsyn Date: 2016-03-16 16:41 -0400 URL: http://hg.openjdk.java.net/jigsaw/jake/hotspot/rev/ed6046fc103f Fix JVMTI Jake test failures ! src/share/vm/prims/jvmtiEnvBase.hpp ! src/share/vm/prims/jvmtiEventController.cpp
16-03-2016

The patch above resolves the following test failures: jvmti/unit/MethodBind/JvmtiTest jvmti/GetBytecodes/bytecodes003 nsk/jvmti/SingleStep/singlestep002 nsk/jvmti/scenarios/events/EM02/em02t007
16-03-2016

This is the suggested fix: sspitsyn@j1-nehalem hg diff diff -r 398601df5686 src/share/vm/prims/jvmtiEnvBase.hpp --- a/src/share/vm/prims/jvmtiEnvBase.hpp Tue Mar 15 09:38:53 2016 +0100 +++ b/src/share/vm/prims/jvmtiEnvBase.hpp Wed Mar 16 18:23:44 2016 +0000 @@ -75,7 +75,7 @@ }; static jvmtiPhase get_phase() { return _phase; } - static jvmtiPhase get_phase(jvmtiEnv* env) { return ((JvmtiEnvBase*)env)->phase(); } + static jvmtiPhase get_phase(jvmtiEnv* env) { return ((JvmtiEnvBase*)JvmtiEnv_from_jvmti_env(env))->phase(); } static void set_phase(jvmtiPhase phase) { _phase = phase; } static bool is_vm_live() { return _phase == JVMTI_PHASE_LIVE; } diff -r 398601df5686 src/share/vm/prims/jvmtiEventController.cpp --- a/src/share/vm/prims/jvmtiEventController.cpp Tue Mar 15 09:38:53 2016 +0100 +++ b/src/share/vm/prims/jvmtiEventController.cpp Wed Mar 16 18:23:44 2016 +0000 @@ -98,7 +98,6 @@ static const jlong EARLY_EVENT_BITS = CLASS_FILE_LOAD_HOOK_BIT | VM_START_BIT | VM_INIT_BIT | VM_DEATH_BIT | NATIVE_METHOD_BIND_BIT | THREAD_START_BIT | THREAD_END_BIT | - CLASS_LOAD_BIT | CLASS_PREPARE_BIT | COMPILED_METHOD_LOAD_BIT | COMPILED_METHOD_UNLOAD_BIT | DYNAMIC_CODE_GENERATED_BIT; static const jlong GLOBAL_EVENT_BITS = ~THREAD_FILTERED_EVENT_BITS;
16-03-2016

The following tests have to be impacted by this bug as well: demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java jvmti/GetBytecodes/bytecodes003
14-03-2016

This issue is not reproducible with my manual build on Solaris-x64. It seems, there is something different in the way the repository is built. I will also try to run the tests on Linux-x64.
10-03-2016

I initially asked Lois to close this bug as a dup of the related bug above. I'm not sure yet it is a dup, however. So, I reopened the bug again until it is clear that it is is a dup.
10-03-2016