JDK-8240548 : [TESTBUG] runtime/cds/appcds/dynamicArchive/NoClassToArchive.java fails with Graal
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15,repo-valhalla
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-03-04
  • Updated: 2024-01-29
  • Resolved: 2020-03-12
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 15
15 b15Fixed
Related Reports
Relates :  
Description
[1.113s][info   ][cds,dynamic] Written dynamic archive 0x00000008008d0000 - 0x00000008008e19c0 [1064 bytes header, 72128 bytes total]
[1.113s][info   ][cds,dynamic] 0 klasses; 17 symbols

[...]

java.lang.RuntimeException: 'There is no class to be included in the dynamic archive' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:187)
	at NoClassToArchive.checkWarning(NoClassToArchive.java:68)
	at NoClassToArchive.lambda$doTest$0(NoClassToArchive.java:78)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:145)
	at NoClassToArchive.doTestCustomBase(NoClassToArchive.java:113)
	at NoClassToArchive.testCustomBase(NoClassToArchive.java:61)
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/91f95b517b0c User: iklam Date: 2020-03-12 04:42:46 +0000
12-03-2020

This test should not be executed with graal. This test started failing in valhalla/nestmate because the string "unsafe anonymous" is no longer printed by -Xlog:class+load=trace. However, the underlying problem is unrelated to nestmate. So I will fix the test in the mainline jdk/jdk and it can be synced down to nestmate. The test assumes that when "java -version" is executed, only a very limited number of classes are loaded, and all of those are loaded from the default shared archive. However, when graal is used as the JIT, many extra classes are loaded during VM start-up. Some of those are loaded dynamically from jrt:/. Some classes are also defined by LambdaMetafactory. This causes complexity that cannot be easily handled by this test. The VM code covered by this test can be sufficiently tested with C1/C2. So there's no need to bend over backwards to run this test with graal.
09-03-2020

I'll take a look to see why "[1.113s][info ][cds,dynamic] 0 klasses; 17 symbols" is printed but we don't print "There is no class to be included in the dynamic archive"
05-03-2020

I think this should be a sub-task or related to JDK-8219607 since this test failure is related to Graal.
05-03-2020

[~mchung] [~hseigel] Do you want this as a sub-task of JDK-8205939, like JDK-8230935?
04-03-2020