JDK-8277812 : vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java fails with "TestFailure: InterruptedException.getMessage() returns unexpected value (expected is 'attach002a: redefined version'), probably class wasn't redefined"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 18
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2021-11-24
  • Updated: 2022-11-15
  • Resolved: 2021-12-09
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8277813 :  
Description
The following test failed in the JDK18 CI:

vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java

Here's a snippet from the log file:

TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): InterruptedException.getMessage(): 'Test InterruptedException'
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): # ERROR: InterruptedException.getMessage() returns unexpected value (expected is 'attach002a: redefined version'), probably class wasn't redefined
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/String;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: [B)

<snip>

TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): The following stacktrace is for failure analysis.
TargetApp (stdout): nsk.share.TestFailure: InterruptedException.getMessage() returns unexpected value (expected is 'attach002a: redefined version'), probably class wasn't redefined
TargetApp (stdout): 	at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
TargetApp (stdout): 	at nsk.share.Log.complain(Log.java:403)
TargetApp (stdout): 	at nsk.share.aod.TargetApplicationWaitingAgents.setStatusFailed(TargetApplicationWaitingAgents.java:275)
TargetApp (stdout): 	at nsk.jvmti.AttachOnDemand.attach002a.attach002aTarget.targetApplicationActions(attach002aTarget.java:44)
TargetApp (stdout): 	at nsk.share.aod.TargetApplicationWaitingAgents.runTargetApplication(TargetApplicationWaitingAgents.java:354)
TargetApp (stdout): 	at nsk.jvmti.AttachOnDemand.attach002a.attach002aTarget.main(attach002aTarget.java:51)
TargetApp (stdout): Waiting for agents finishing
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)

<snip>

TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/lang/invoke/MemberName;)
TargetApp (stdout): # ERROR: Agents didn't finish in 300000ms, stop execution (attached agents number: 1, finished agents number: 0)
TargetApp (stdout): The following stacktrace is for failure analysis.
TargetApp (stdout): nsk.share.TestFailure: Agents didn't finish in 300000ms, stop execution (attached agents number: 1, finished agents number: 0)
TargetApp (stdout): 	at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:432)
TargetApp (stdout): 	at nsk.share.Log.complain(Log.java:403)
TargetApp (stdout): 	at nsk.share.aod.TargetApplicationWaitingAgents.exitAsFailed(TargetApplicationWaitingAgents.java:289)
TargetApp (stdout): 	at nsk.share.aod.TargetApplicationWaitingAgents.waitAgentsFinishing(TargetApplicationWaitingAgents.java:264)
TargetApp (stdout): 	at nsk.share.aod.TargetApplicationWaitingAgents.runTargetApplication(TargetApplicationWaitingAgents.java:368)
TargetApp (stdout): 	at nsk.jvmti.AttachOnDemand.attach002a.attach002aTarget.main(attach002aTarget.java:51)
TargetApp (stdout): # ERROR: Stop execution
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: Ljava/util/regex/Pattern$$Lambda$18.0x800000028;)
TargetApp (stdout): - attach002aAgent00.cpp, 63: NativeAgent-0: ObjectAlloc event received (object class: [Ljava/lang/StackTraceElement;)
TargetApp (stdout): 
TargetApp (stdout): 
TargetApp (stdout): #>  
TargetApp (stdout): #>  SUMMARY: Following errors occured
TargetApp (stdout): #>      during test execution:
TargetApp (stdout): #>  
TargetApp (stdout): # ERROR: InterruptedException.getMessage() returns unexpected value (expected is 'attach002a: redefined version'), probably class wasn't redefined
TargetApp (stdout): # ERROR: Agents didn't finish in 300000ms, stop execution (attached agents number: 1, finished agents number: 0)
TargetApp (stdout): # ERROR: Stop execution
----------System.err:(12/754)----------
nsk.share.Failure: Target application finished with non-zero code 97
	at nsk.share.aod.AODTestRunner.runTest(AODTestRunner.java:153)
	at nsk.share.aod.AODTestRunner.main(AODTestRunner.java:184)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:833)

JavaTest Message: Test threw exception: nsk.share.Failure: Target application finished with non-zero code 97
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: nsk.share.Failure: Target application finished with non-zero code 97
----------rerun:(43/9600)*----------
Comments
[~sspitsyn] [~lmesnik] Are you sure this is a dup of JDK-8277573? I don't see how they relate. If it is a dup, then the problem list entry needs to be updated.
15-11-2022

I removed this test from problemlist JDK-8265795. I verified that it pass, probably the failure is intermittent. I'll check what happened here.
24-11-2021

The fix for JDK-8265795 is in jdk-18+25-1673 and the first sighting is in jdk-18+25-1681-tier4 which is the first Tier4 to include that fix.
24-11-2021

Caused by JDK-8265795 ?
24-11-2021

Please note that: vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java has also failed with a different failure mode on Windows that is tracked by the following bug: JDK-8261603 vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java failed with "non-zero code -1073741819"
24-11-2021