RFR: 8213445: jcmd VM.symboltable and VM.stringtable -verbose output contains no shared symbols or strings [v3]

Calvin Cheung ccheung at openjdk.java.net
Fri Apr 15 23:52:28 UTC 2022


On Fri, 15 Apr 2022 17:39:08 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>>> Yes. Otherwise, I saw the following failures in the tests under cds/appcds/jcmd
>>> 
>>> ```
>>> <prefix path>/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/2/runtime/cds/appcds/jcmd/JCmdTestFileSafety.d/jdk/test/lib/apps/LingeredApp.class : no such file or directory
>>> <prefix path>/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/2/runtime/cds/appcds/jcmd/JCmdTestFileSafety.d/jdk/test/lib/apps/LingeredApp$1.class : no such file or directory
>>> java.lang.RuntimeException: jar operation failed
>>> 	at JarBuilder.createJar(JarBuilder.java:216)
>>> 	at JarBuilder.createSimpleJar(JarBuilder.java:180)
>>> 	at JarBuilder.build(JarBuilder.java:90)
>>> 	at JCmdTestDumpBase.buildJars(JCmdTestDumpBase.java:91)
>>> 	at JCmdTestFileSafety.test(JCmdTestFileSafety.java:75)
>>> 	at JCmdTestDumpBase.runTest(JCmdTestDumpBase.java:61)
>>> 	at JCmdTestFileSafety.main(JCmdTestFileSafety.java:145)
>>> 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>>> 	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
>>> 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
>>> 	at java.base/java.lang.Thread.run(Thread.java:828)
>>> ```
>>> 
>>> Not sure why my new DynamicSharedSymbols.java seems to trigger the above failure.
>> 
>> The problem is caused by [CODETOOLS-7902847](https://bugs.openjdk.java.net/browse/CODETOOLS-7902847)
>> 
>> Have you tried using `@build` instead of `@compile`? That way you don't need to specify the file location.
>
> I did try `@build` but it didn't work because the class file will be placed in a path specified by the `-Dtest.class.path` property such as `./JTwork/classes/0/test/hotspot/jtreg/runtime/cds/appcds/test-classes`. During the test run, it tries to find the class from the `-Dtest.classes` such as `./JTwork/classes/0/runtime/cds/appcds/jcmd/JCmdTestFileSafety.d` and couldn't find it.

I've updated the tests under appcds/jcmd to using `@build` and `ClassFileInstaller.writeJar` for creating jar files.

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

PR: https://git.openjdk.java.net/jdk/pull/8234


More information about the hotspot-runtime-dev mailing list