-
Bug
-
Resolution: Fixed
-
P4
-
21
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8322665 | 17.0.11-oracle | Mimoun Ghordou | P4 | Resolved | Fixed | b01 |
JDK-8322796 | 17.0.11 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
I was running all the runtime/cds/appcds/dynamicArchive tests and had an unexpected and strange failure in LambdaProxyDuringShutdown.java:
java.lang.RuntimeException: 'class.load.*Outer[$]Inner[$][$]Lambda.*0x.*source:.Outer' missing from stdout/stderr
When I examined the log there was no sign that the installed shutdown hook had executed, causing the Outer and Inner classes to be loaded. After much experimentation and head scratching I did observe some unexpected output:
shut down hook invoked...
Searching the sources this comes from:
class MyShutdown extends Thread{
public void run(){
System.out.println("shut down hook invoked...");
}
}
in class LinkClassApp - which is a different test! The problem is that LambdaProxyDuringShutdownApp also has this:
class MyShutdown extends Thread {
public void run() {
Outer.Inner inner = new Outer.Inner();
}
}
and it became evident that when running the tests locally, under the right/wrong conditions the LambdaProxy test was using the LinkClass test's MyShutdown class. Sure enough this class gets compiled into:
JTwork/classes/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes
which is shared by both tests.
Simple fix is to rename one of the classes so there is no duplication.
java.lang.RuntimeException: 'class.load.*Outer[$]Inner[$][$]Lambda.*0x.*source:.Outer' missing from stdout/stderr
When I examined the log there was no sign that the installed shutdown hook had executed, causing the Outer and Inner classes to be loaded. After much experimentation and head scratching I did observe some unexpected output:
shut down hook invoked...
Searching the sources this comes from:
class MyShutdown extends Thread{
public void run(){
System.out.println("shut down hook invoked...");
}
}
in class LinkClassApp - which is a different test! The problem is that LambdaProxyDuringShutdownApp also has this:
class MyShutdown extends Thread {
public void run() {
Outer.Inner inner = new Outer.Inner();
}
}
and it became evident that when running the tests locally, under the right/wrong conditions the LambdaProxy test was using the LinkClass test's MyShutdown class. Sure enough this class gets compiled into:
JTwork/classes/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes
which is shared by both tests.
Simple fix is to rename one of the classes so there is no duplication.
- backported by
-
JDK-8322665 Duplicate class names in dynamicArchive tests can lead to test failure
- Resolved
-
JDK-8322796 Duplicate class names in dynamicArchive tests can lead to test failure
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/dd7ea342
-
Commit openjdk/jdk/b2240bf8
-
Review openjdk/jdk17u-dev/2087
-
Review openjdk/jdk/13542
(1 links to)