Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk8: jdk/jfr/jcmd/TestJcmdDumpPathToGCRoots.java failed with error message: "Execution failed: `main' threw exception: java.lang.Exception: Expected chains but found none " #2766

Closed
sophia-guo opened this issue Jul 21, 2021 · 6 comments · Fixed by #5495
Assignees

Comments

@sophia-guo
Copy link
Contributor

jdk8: jdk/jfr/jcmd/TestJcmdDumpPathToGCRoots.java failed with error message: "Execution failed: `main' threw exception: java.lang.Exception: Expected chains but found none "

https://ci.adoptopenjdk.net/job/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/9/testReport/junit/jdk_jfr_jcmd_TestJcmdDumpPathToGCRoots/java/TestJcmdDumpPathToGCRoots/

Stacktrace
Execution failed: `main' threw exception: java.lang.Exception: Expected chains but found none    
Standard Output
Recording id: 1
Settings: {jdk.OldObjectSample#cutoff=infinity}
Command: JFR.dump path-to-gc-roots=true
Chains expected: true
Running DCMD 'JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots1.jfr' through 'PidJcmdExecutor'
Executing command '[/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/openjdkbinary/j2sdk-image/bin/jcmd, 1476206, JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots1.jfr]'
Command returned with exit code 0
---------------- stdout ----------------
1476206:
Dumped recording "dodo", 89.9 kB written to:

/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots1.jfr

---------------- stderr ----------------

----------------------------------------

Recording id: 2
Settings: {jdk.OldObjectSample#cutoff=0 ns}
Command: JFR.dump path-to-gc-roots=true
Chains expected: true
Running DCMD 'JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots2.jfr' through 'PidJcmdExecutor'
Executing command '[/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/openjdkbinary/j2sdk-image/bin/jcmd, 1476206, JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots2.jfr]'
Command returned with exit code 0
---------------- stdout ----------------
1476206:
Dumped recording "dodo", 87.8 kB written to:

/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots2.jfr

---------------- stderr ----------------

----------------------------------------

Recording id: 3
Settings: {}
Command: JFR.dump path-to-gc-roots=true
Chains expected: true
Running DCMD 'JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots3.jfr' through 'PidJcmdExecutor'
Executing command '[/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/openjdkbinary/j2sdk-image/bin/jcmd, 1476206, JFR.dump name=dodo path-to-gc-roots=true filename=/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots3.jfr]'
Command returned with exit code 0
---------------- stdout ----------------
1476206:
Dumped recording "dodo", 89.3 kB written to:

/home/jenkins/workspace/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_0/aqa-tests/TKG/output_16265307128860/jdk_jfr_1/work/scratch/2/TestJcmdDumpPathToGCRoots3.jfr

---------------- stderr ----------------
...
, jdk.OldObjectSample {
  startTime = 15:14:54.341
  duration = 14.202 ms
  allocationTime = 15:14:54.340
  lastKnownHeapUsage = 5.9 MB
  object =  [
    java.security.Permission[1]
  ]
  arrayElements = 1
  root = N/A
  eventThread = "Attach Listener" (javaThreadId = 18)
  stackTrace = [
    jdk.jfr.internal.SecuritySupport.setAccessible(Field) line: 365
    jdk.jfr.internal.Utils.getHandler(Class) line: 320
    jdk.jfr.internal.SettingsManager.updateRetransform(List) line: 158
    jdk.jfr.internal.SettingsManager.setSettings(List) line: 151
    jdk.jfr.internal.MetadataRepository.setSettings(List) line: 177
    ...
  ]
}

]
    
Standard Error
java.lang.Exception: Expected chains but found none
	at jdk.jfr.jcmd.TestJcmdDumpPathToGCRoots.testDump(TestJcmdDumpPathToGCRoots.java:105)
	at jdk.jfr.jcmd.TestJcmdDumpPathToGCRoots.main(TestJcmdDumpPathToGCRoots.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.lang.Thread.run(Thread.java:748)

JavaTest Message: Test threw exception: java.lang.Exception: Expected chains but found none
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: Expected chains but found none
    
REST API
Jenkins 2.263.3
@karianna
Copy link
Contributor

@sophia-guo
Copy link
Contributor Author

sophia-guo commented May 20, 2022

aarch64 linux #2985

@zzambers
Copy link
Contributor

Seems like this issue:
https://bugs.openjdk.org/browse/JDK-8305931
(will need to get backported)

@roberttoyonaga
Copy link
Contributor

roberttoyonaga commented Aug 6, 2024

The fix has been backported all the way to JDK8 now [GH, JBS]. The tests are passing on the previously failing platforms (with the nightly build):

(linux x64 )https://ci.adoptium.net/view/Test_grinder/job/Grinder/10706/parameters/
(windows x64) https://ci.adoptium.net/view/Test_grinder/job/Grinder/10708/
(aarch64) https://ci.adoptium.net/view/Test_grinder/job/Grinder/10707/

Can this issue be closed now?

@sophia-guo
Copy link
Contributor Author

Thanks @roberttoyonaga. This will be closed by #5495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants