JDK-8351998 : Test testlibrary_tests/compile_framework/tests/TestConcurrentCompilation.java failed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17.0.16,21,21.0.8,24,25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-03-14
  • Updated: 2025-03-14
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 25
25Unresolved
Related Reports
Causes :  
Relates :  
Description
----------System.out:(14/743)----------
Generating threads:
Waiting to join threads:
Generate and compile XYZ for 0
Generate and compile XYZ for 1
Generate and compile XYZ for 2
------------------ CompileFramework: Compilation ------------------
------------------ CompileFramework: Compilation ------------------
------------------ CompileFramework: Compilation ------------------
Source directory: ./compile-framework-sources-12756916290780714122
Source directory: ./compile-framework-sources-13364551242363981353
Classes directory: ./compile-framework-classes-13946220712384053435
Source directory: ./compile-framework-sources-2024838613173367255
Classes directory: ./compile-framework-classes-8160990634942654696
Classes directory: ./compile-framework-classes-167690670583201317
----------System.err:(48/2434)----------
Compilation failed.
Exit code: 0
Output: '[0.002s][warning][perf,memops] Cannot use file /tmp/hsperfdata_mach5-one/1612828 because it is locked by another process (errno = 11)
'
java.lang.RuntimeException: interrupted
	at compile_framework.tests.TestConcurrentCompilation.main(TestConcurrentCompilation.java:104)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
	at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.lang.InterruptedException
	at java.base/java.lang.Object.wait0(Native Method)
	at java.base/java.lang.Object.wait(Object.java:389)
	at java.base/java.lang.Thread.join(Thread.java:1860)
	at java.base/java.lang.Thread.join(Thread.java:1936)
	at compile_framework.tests.TestConcurrentCompilation.main(TestConcurrentCompilation.java:101)
	... 4 more

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test


JavaTest Message: Problem cleaning up the following threads:
Thread-16

  at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMThreadGroup.uncaughtException(MainActionHelper.java:381)
  at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2529)

Thread-17
JavaTest Message: Problem cleaning up the following threads:
Thread-16
  at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMThreadGroup.uncaughtException(MainActionHelper.java:381)
  at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMThreadGroup.uncaughtException(MainActionHelper.java:381)
  at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2529)

Thread-17
  at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2529)

  at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMThreadGroup.uncaughtException(MainActionHelper.java:381)
  at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2529)

Thread-18
  at java.base/java.lang.ThreadLocal.isPresent(ThreadLocal.java:209)
  at java.base/java.lang.ThreadLocal.isCarrierThreadLocalPresent(ThreadLocal.java:205)
  at java.base/java.lang.System$1.isCarrierThreadLocalPresent(System.java:2241)
  at java.base/jdk.internal.misc.CarrierThreadLocal.isPresent(CarrierThreadLocal.java:53)
  at java.base/java.lang.Thread.exit(Thread.java:1495)

result: Error. Error while cleaning up threads after test
Comments
Interestingly, I've had similar issues with javac warnings recently, and already know how to fix it, see JDK-8352020.
14-03-2025

Thanks for investigating Emanuel! ILW = Test fails due to unexpected javac output (test bug), intermittent with single test, no workaround = MLH = P4
14-03-2025

It seems one of the concurrent "javac" compilations from the CompileFramework has actually not failed, but prints some messages that I'm not expecting. ----------System.err:(48/2434)---------- Compilation failed. Exit code: 0 Output: '[0.002s][warning][perf,memops] Cannot use file /tmp/hsperfdata_mach5-one/1612828 because it is locked by another process (errno = 11) Strangely, there is no "Output" printed, we should see it from this code: 195 if (exitCode != 0 || !output.isEmpty()) { 196 System.err.println("Compilation failed."); 197 System.err.println("Exit code: " + exitCode); 198 System.err.println("Output: '" + output + "'"); 199 throw new CompileFrameworkException("Compilation failed."); 200 } So maybe there was a timeout. The reported run took 3min 44s. The "join" catches the "InterruptedException". There are some tier4 failures as well: Compilation failed. Exit code: 0 Output: 'Picked up JAVA_TOOL_OPTIONS: -Xms64m -Xmx4g Picked up _JAVA_OPTIONS: -Xms64m -Xmx4g [0.010s][warning][cds] This file is not the one used while building the shared archive file: '/opt/mach5/mesos/work_dir/jib-master/install/2025-03-04-2152378.leonid.mesnik.main/linux-x64-jcov.jdk/jdk-25/lib/modules', size has changed Compilation failed. Exit code: 0 Output: 'Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Invalid aliases, disabling interference verification! Here we can see that there is some "Output" that javac has generated, I did not expect that to happen. "javac" can generate warnings, for example like this: javac --add-modules=jdk.incubator.vector Test.java warning: [incubating] using incubating module(s): jdk.incubator.vector 1 warning I just have to remove the check that "javac" does not generate any output.
14-03-2025