JDK-8329140 : Spring boot virtual threads -Djdk.tracePinnedThreads=full causes tasks to hang
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 21
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2024-03-14
  • Updated: 2024-06-07
  • Resolved: 2024-05-02
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 23
23Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 11
java -version
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

A DESCRIPTION OF THE PROBLEM :
Also posted at https://stackoverflow.com/questions/77779953/spring-boot-virtual-threads-djdk-tracepinnedthreads-full-causes-tasks-to-hang

If I run the test with the below setup including -Djdk.tracePinnedThreads=full the test hangs. Without it it runs fine. Any ideas why this might happen. Is there any additional configuration for spring I may need

pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>org.test</groupId>
    <artifactId>virtual-spring</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>VirtualSpring</name>
    <description>Virtual Spring Boot</description>
    <properties>
        <java.version>21</java.version>
    </properties>
    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
           
        <!--Testing-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

application.properties

spring.main.keep-alive=true
spring.threads.virtual.enabled=true
application class

package org.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class VirtualSpringApplication {

    public static void main(String[] args) {
        SpringApplication.run(VirtualSpringApplication.class, args);
    }

}
and test class

package org.test;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class VirtualSpringApplicationTests {

    @Test
    public void pinned() throws InterruptedException {

        final Thread thread0 = Thread.startVirtualThread(() -> testForPin(0));
        final Thread thread1 = Thread.startVirtualThread(() -> testForPin(1));
        final Thread thread2 = Thread.startVirtualThread(() -> testForPin(2));
        System.out.println("THREADS STARTED\n");

        thread0.join();
        thread1.join();
        thread2.join();

    }

    synchronized public void testForPin(final int i) {

        System.out.println("Thread: " + Thread.currentThread().toString() + ", virtual=" + Thread.currentThread().isVirtual() + " i=" + i);
        try {
            Thread.sleep(1000);
            System.out.println("Thread Finished: " + Thread.currentThread().toString() + ", virtual=" + Thread.currentThread().isVirtual() + " i=" + i);
        } catch (final InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}

Run with mvn clean test -Dtest=VirtualSpringApplicationTests -Djdk.tracePinnedThreads=full and it fails

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
mvn clean test -Dtest=VirtualSpringApplicationTests -Djdk.tracePinnedThreads=full

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
expect same result as when you run it successfully with 
mvn clean test -Dtest=VirtualSpringApplicationTests
ACTUAL -
Hangs jhsdb jstack relevant parts shown below
jhsdb jstack --pid 16244
Attaching to process ID 16244, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 21.0.2+13-58
Deadlock Detection:

No deadlocks found.

"ForkJoinPool-1-worker-1" #61 daemon prio=5 tid=0x0000025b552abba0 nid=13468 waiting on condition [0x000000e1986fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked
 - java.lang.VirtualThread$VThreadContinuation.onPinned(jdk.internal.vm.Continuation$Pinned) @bci=23, line=183 (Interpreted frame)
 - jdk.internal.vm.Continuation.onPinned0(int) @bci=5, line=393 (Interpreted frame)
 - jdk.internal.vm.Continuation.yield0(jdk.internal.vm.ContinuationScope, jdk.internal.vm.Continuation) @bci=325, line=385 (Interpreted frame)
 - jdk.internal.vm.Continuation.yield(jdk.internal.vm.ContinuationScope) @bci=69, line=351 (Interpreted frame)
 - java.lang.VirtualThread.yieldContinuation() @bci=12, line=431 (Interpreted frame)
 - java.lang.VirtualThread.parkNanos(long) @bci=69, line=621 (Interpreted frame)
 - java.lang.VirtualThread.sleepNanos(long) @bci=70, line=791 (Interpreted frame)
 - java.lang.Thread.sleep(long) @bci=53, line=507 (Interpreted frame)
 - org.test.VirtualSpringApplicationTests.testForPin(int) @bci=27, line=27 (Interpreted frame)
        - locked <0x0000000621801bb8> (a org.test.VirtualSpringApplicationTests)
 - org.test.VirtualSpringApplicationTests.lambda$pinned$0() @bci=2, line=12 (Interpreted frame)
 - org.test.VirtualSpringApplicationTests$$Lambda+0x0000025b58449680.run() @bci=4 (Interpreted frame)
 - java.lang.Thread.runWith(java.lang.Object, java.lang.Runnable) @bci=5, line=1596 (Interpreted frame)
 - java.lang.VirtualThread.run(java.lang.Runnable) @bci=63, line=309 (Interpreted frame)
 - java.lang.VirtualThread$VThreadContinuation$1.run() @bci=8, line=190 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter0() @bci=4, line=320 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter(jdk.internal.vm.Continuation, boolean) @bci=1, line=312 (Interpreted frame)
 - jdk.internal.vm.Continuation.enterSpecial(jdk.internal.vm.Continuation, boolean, boolean) @bci=0 (Compiled frame)
 - jdk.internal.vm.Continuation.run() @bci=122, line=248 (Interpreted frame)
 - java.lang.VirtualThread.runContinuation() @bci=71, line=221 (Interpreted frame)
 - java.lang.VirtualThread$$Lambda+0x0000025b5838ac20.run() @bci=4 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec() @bci=4, line=1423 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask.doExec() @bci=10, line=387 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.util.concurrent.ForkJoinTask, java.util.concurrent.ForkJoinPool$WorkQueue) @bci=19, line=1312 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.scan(java.util.concurrent.ForkJoinPool$WorkQueue, int, int) @bci=211, line=1843 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.runWorker(java.util.concurrent.ForkJoinPool$WorkQueue) @bci=35, line=1808 (Interpreted frame)
 - java.util.concurrent.ForkJoinWorkerThread.run() @bci=31, line=188 (Interpreted frame)


"ForkJoinPool-1-worker-2" #64 daemon prio=5 tid=0x0000025b552ac230 nid=1028 waiting for monitor entry [0x000000e1987fe000]
   java.lang.Thread.State: BLOCKED (on object monitor)
   JavaThread state: _thread_blocked
 - org.test.VirtualSpringApplicationTests.testForPin(int) @bci=0, line=25 (Interpreted frame)
        - waiting to lock <0x0000000621801bb8> (a org.test.VirtualSpringApplicationTests)
 - org.test.VirtualSpringApplicationTests.lambda$pinned$1() @bci=2, line=13 (Interpreted frame)
 - org.test.VirtualSpringApplicationTests$$Lambda+0x0000025b584498a0.run() @bci=4 (Interpreted frame)
 - java.lang.Thread.runWith(java.lang.Object, java.lang.Runnable) @bci=5, line=1596 (Interpreted frame)
 - java.lang.VirtualThread.run(java.lang.Runnable) @bci=63, line=309 (Interpreted frame)
 - java.lang.VirtualThread$VThreadContinuation$1.run() @bci=8, line=190 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter0() @bci=4, line=320 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter(jdk.internal.vm.Continuation, boolean) @bci=1, line=312 (Interpreted frame)
 - jdk.internal.vm.Continuation.enterSpecial(jdk.internal.vm.Continuation, boolean, boolean) @bci=0 (Compiled frame)
 - jdk.internal.vm.Continuation.run() @bci=122, line=248 (Interpreted frame)
 - java.lang.VirtualThread.runContinuation() @bci=71, line=221 (Interpreted frame)
 - java.lang.VirtualThread$$Lambda+0x0000025b5838ac20.run() @bci=4 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec() @bci=4, line=1423 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask.doExec() @bci=10, line=387 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.util.concurrent.ForkJoinTask, java.util.concurrent.ForkJoinPool$WorkQueue) @bci=19, line=1312 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.scan(java.util.concurrent.ForkJoinPool$WorkQueue, int, int) @bci=211, line=1843 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.runWorker(java.util.concurrent.ForkJoinPool$WorkQueue) @bci=35, line=1808 (Interpreted frame)
 - java.util.concurrent.ForkJoinWorkerThread.run() @bci=31, line=188 (Interpreted frame)


"ForkJoinPool-1-worker-3" #65 daemon prio=5 tid=0x0000025b552acf50 nid=11824 waiting for monitor entry [0x000000e1988fe000]
   java.lang.Thread.State: BLOCKED (on object monitor)
   JavaThread state: _thread_blocked
 - org.test.VirtualSpringApplicationTests.testForPin(int) @bci=0, line=25 (Interpreted frame)
        - waiting to lock <0x0000000621801bb8> (a org.test.VirtualSpringApplicationTests)
 - org.test.VirtualSpringApplicationTests.lambda$pinned$2() @bci=2, line=14 (Interpreted frame)
 - org.test.VirtualSpringApplicationTests$$Lambda+0x0000025b58449ac0.run() @bci=4 (Interpreted frame)
 - java.lang.Thread.runWith(java.lang.Object, java.lang.Runnable) @bci=5, line=1596 (Interpreted frame)
 - java.lang.VirtualThread.run(java.lang.Runnable) @bci=63, line=309 (Interpreted frame)
 - java.lang.VirtualThread$VThreadContinuation$1.run() @bci=8, line=190 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter0() @bci=4, line=320 (Interpreted frame)
 - jdk.internal.vm.Continuation.enter(jdk.internal.vm.Continuation, boolean) @bci=1, line=312 (Interpreted frame)
 - jdk.internal.vm.Continuation.enterSpecial(jdk.internal.vm.Continuation, boolean, boolean) @bci=0 (Compiled frame)
 - jdk.internal.vm.Continuation.run() @bci=122, line=248 (Interpreted frame)
 - java.lang.VirtualThread.runContinuation() @bci=71, line=221 (Interpreted frame)
 - java.lang.VirtualThread$$Lambda+0x0000025b5838ac20.run() @bci=4 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec() @bci=4, line=1423 (Interpreted frame)
 - java.util.concurrent.ForkJoinTask.doExec() @bci=10, line=387 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.util.concurrent.ForkJoinTask, java.util.concurrent.ForkJoinPool$WorkQueue) @bci=19, line=1312 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.scan(java.util.concurrent.ForkJoinPool$WorkQueue, int, int) @bci=211, line=1843 (Interpreted frame)
 - java.util.concurrent.ForkJoinPool.runWorker(java.util.concurrent.ForkJoinPool$WorkQueue) @bci=35, line=1808 (Interpreted frame)
 - java.util.concurrent.ForkJoinWorkerThread.run() @bci=31, line=188 (Interpreted frame)

---------- BEGIN SOURCE ----------
includes in description
---------- END SOURCE ----------

FREQUENCY : always



Comments
Closing this issue as a dup of JDK-8330146. The plan is to add conditional returns from the CFLH, ClassPrepare and ClassLoad event posting code when in a VTMS transition. This will fix this issue as well.
02-05-2024

Please, see my comments in the related JBS issue: JDK-8330146. The VThreadContinuation.onPinned() is invoked in the context of an unmount transition. Please, see this function: /** * Invokes Continuation.yield, notifying JVMTI (if enabled) to hide frames until * the continuation continues. */ @Hidden private boolean yieldContinuation() { notifyJvmtiUnmount(/*hide*/true); <= JVMTI is notified about unmount transition start try { return Continuation.yield(VTHREAD_SCOPE); } finally { notifyJvmtiMount(/*hide*/false); <= JVMTI is notified about unmount transition finish } } We have the assert in place (please, see the event handling code below): class JvmtiClassFileLoadHookPoster : public StackObj { . . . public: inline JvmtiClassFileLoadHookPoster(Symbol* h_name, Handle class_loader, Handle h_protection_domain, unsigned char **data_ptr, unsigned char **end_ptr, JvmtiCachedClassFileData **cache_ptr) { . . . assert(!_thread->is_in_any_VTMS_transition(), "CFLH events are not allowed in any VTMS transition"); <<< !!! ASSERT !!! _state = JvmtiExport::get_jvmti_thread_state(_thread); This will fire an assert if executed in VM debug version. We probably should just ignore the event when in product mode. Does this solution look okay? Another approach is to avoid loading class when in VTMS transitions.
25-04-2024

Found this stack overflow post which can be useful to look at: https://stackoverflow.com/questions/77779953/spring-boot-virtual-threads-djdk-tracepinnedthreads-full-causes-tasks-to-hang
25-04-2024

I wonder if the JDK-8330146 is somehow related.
23-04-2024

Targeted to 23. At least, this needs to be evaluated.
04-04-2024

I think this a JVMTI issue. The test runs with Mockito that enables (via ByteBuddy agent) the JVMTI ClassFileLoadHook event. It appears that the loading of classes for the pinned thread printing blocks indefinitely in VTMS_transition_disable_for_all. The pinned thread printing runs in the context of the carrier, not the virtual thread, and it appears that the VTMS mechanism is stuck waiting for the pinned virtual thread to exit the VTMS transition disabler, which will never happen. Running with -XX:+UnlockExperimentalVMOptions -XX:-DoJVMTIVirtualThreadTransitions works around the issue. Another workaround is to use JFR events instead of -Djdk.tracePinnedThreads.
02-04-2024

Okay, if I build with 22 and then run the test with mainline, I can see the hang. Succeeds mvn test <startup output removed> . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.1) WARNING: A Java agent has been loaded dynamically (/Users/mimcmah/.m2/repository/net/bytebuddy/byte-buddy-agent/1.14.10/byte-buddy-agent-1.14.10.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended THREADS STARTED Thread: VirtualThread[#40]/runnable@ForkJoinPool-1-worker-1, virtual=true i=0 Thread Finished: VirtualThread[#40]/runnable@ForkJoinPool-1-worker-1, virtual=true i=0 Thread: VirtualThread[#44]/runnable@ForkJoinPool-1-worker-3, virtual=true i=2 Thread Finished: VirtualThread[#44]/runnable@ForkJoinPool-1-worker-3, virtual=true i=2 Thread: VirtualThread[#42]/runnable@ForkJoinPool-1-worker-2, virtual=true i=1 Thread Finished: VirtualThread[#42]/runnable@ForkJoinPool-1-worker-2, virtual=true i=1 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.460 s -- in org.test.VirtualSpringApplicationTests [INFO] Running org.test.VirtualTest THREADS STARTED Thread: VirtualThread[#47]/runnable@ForkJoinPool-1-worker-2, virtual=true i=0 Thread Finished: VirtualThread[#47]/runnable@ForkJoinPool-1-worker-2, virtual=true i=0 Thread: VirtualThread[#49]/runnable@ForkJoinPool-1-worker-1, virtual=true i=2 Thread Finished: VirtualThread[#49]/runnable@ForkJoinPool-1-worker-1, virtual=true i=2 Thread: VirtualThread[#48]/runnable@ForkJoinPool-1-worker-3, virtual=true i=1 Thread Finished: VirtualThread[#48]/runnable@ForkJoinPool-1-worker-3, virtual=true i=1 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.017 s -- in org.test.VirtualTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.717 s [INFO] Finished at: 2024-04-02T09:27:46+01:00 [INFO] ------------------------------------------------------------------------ ============================================================== Hangs mvn test -Djdk.tracePinnedThreads=full . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.1) Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended WARNING: A Java agent has been loaded dynamically (/Users/mimcmah/.m2/repository/net/bytebuddy/byte-buddy-agent/1.14.10/byte-buddy-agent-1.14.10.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release THREADS STARTED Thread: VirtualThread[#40]/runnable@ForkJoinPool-1-worker-1, virtual=true i=0
02-04-2024

I tried to get a Thread.dump_to_file from jcmd, but after printing out the PID, that just hangs as well.
29-03-2024

Thread dump showing the hang on MacOS with jdk-22 Command run: mvn clean test -Djdk.tracePinnedThreads=full Full thread dump Java HotSpot(TM) 64-Bit Server VM (22+36-2370 mixed mode, sharing): Threads class SMR info: _java_thread_list=0x0000600000b02140, length=17, elements={ 0x00007fa2a1808200, 0x00007fa2b180da00, 0x00007fa2b1810400, 0x00007fa2a1842600, 0x00007fa2a1842e00, 0x00007fa2a1843600, 0x00007fa2a1843e00, 0x00007fa2a1844600, 0x00007fa28280d600, 0x00007fa28280e600, 0x00007fa2320fc400, 0x00007fa2b1d33a00, 0x00007fa2a1da1e00, 0x00007fa2320f9600, 0x00007fa2b1bd6200, 0x00007fa2a1da1200, 0x00007fa2320f9e00 } "main" #1 [9731] prio=5 os_prio=31 cpu=2359.03ms elapsed=21.59s tid=0x00007fa2a1808200 nid=9731 waiting on condition [0x0000700006ead000] java.lang.Thread.State: WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x0000000603f550e8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(java.base@22/LockSupport.java:371) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(java.base@22/AbstractQueuedSynchronizer.java:519) at java.util.concurrent.ForkJoinPool.unmanagedBlock(java.base@22/ForkJoinPool.java:4013) at java.util.concurrent.ForkJoinPool.managedBlock(java.base@22/ForkJoinPool.java:3961) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@22/AbstractQueuedSynchronizer.java:1707) at java.lang.ProcessImpl.waitFor(java.base@22/ProcessImpl.java:425) at org.apache.maven.surefire.extensions.util.CommandlineExecutor.awaitExit(CommandlineExecutor.java:84) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:572) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1203) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1055) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:871) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@22/DirectMethodHandle$Holder) at java.lang.invoke.LambdaForm$MH/0x000000012f009400.invoke(java.base@22/LambdaForm$MH) at java.lang.invoke.LambdaForm$MH/0x000000012f009800.invokeExact_MT(java.base@22/LambdaForm$MH) at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@22/DirectMethodHandleAccessor.java:155) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@22/DirectMethodHandleAccessor.java:103) at java.lang.reflect.Method.invoke(java.base@22/Method.java:580) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) "Reference Handler" #9 [30211] daemon prio=10 os_prio=31 cpu=1.21ms elapsed=21.56s tid=0x00007fa2b180da00 nid=30211 waiting on condition [0x00007000077cc000] java.lang.Thread.State: RUNNABLE at java.lang.ref.Reference.waitForReferencePendingList(java.base@22/Native Method) at java.lang.ref.Reference.processPendingReferences(java.base@22/Reference.java:246) at java.lang.ref.Reference$ReferenceHandler.run(java.base@22/Reference.java:208) "Finalizer" #10 [25347] daemon prio=8 os_prio=31 cpu=0.45ms elapsed=21.56s tid=0x00007fa2b1810400 nid=25347 in Object.wait() [0x00007000078cf000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait0(java.base@22/Native Method) - waiting on <0x00000007ff800888> (a java.lang.ref.NativeReferenceQueue$Lock) at java.lang.Object.wait(java.base@22/Object.java:375) at java.lang.Object.wait(java.base@22/Object.java:348) at java.lang.ref.NativeReferenceQueue.await(java.base@22/NativeReferenceQueue.java:48) at java.lang.ref.ReferenceQueue.remove0(java.base@22/ReferenceQueue.java:158) at java.lang.ref.NativeReferenceQueue.remove(java.base@22/NativeReferenceQueue.java:89) - locked <0x00000007ff800888> (a java.lang.ref.NativeReferenceQueue$Lock) at java.lang.ref.Finalizer$FinalizerThread.run(java.base@22/Finalizer.java:173) "Signal Dispatcher" #11 [29443] daemon prio=9 os_prio=31 cpu=0.11ms elapsed=21.56s tid=0x00007fa2a1842600 nid=29443 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Service Thread" #12 [28931] daemon prio=9 os_prio=31 cpu=0.18ms elapsed=21.56s tid=0x00007fa2a1842e00 nid=28931 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Monitor Deflation Thread" #13 [25859] daemon prio=9 os_prio=31 cpu=2.10ms elapsed=21.56s tid=0x00007fa2a1843600 nid=25859 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #14 [26115] daemon prio=9 os_prio=31 cpu=1722.27ms elapsed=21.56s tid=0x00007fa2a1843e00 nid=26115 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE No compile task "C1 CompilerThread0" #17 [28419] daemon prio=9 os_prio=31 cpu=1164.89ms elapsed=21.56s tid=0x00007fa2a1844600 nid=28419 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE No compile task "Notification Thread" #18 [27907] daemon prio=9 os_prio=31 cpu=0.06ms elapsed=21.56s tid=0x00007fa28280d600 nid=27907 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Common-Cleaner" #19 [26883] daemon prio=8 os_prio=31 cpu=0.90ms elapsed=21.56s tid=0x00007fa28280e600 nid=26883 waiting on condition [0x0000700007fe4000] java.lang.Thread.State: TIMED_WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x00000007ff8038f8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(java.base@22/LockSupport.java:269) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@22/AbstractQueuedSynchronizer.java:1847) at java.lang.ref.ReferenceQueue.await(java.base@22/ReferenceQueue.java:71) at java.lang.ref.ReferenceQueue.remove0(java.base@22/ReferenceQueue.java:143) at java.lang.ref.ReferenceQueue.remove(java.base@22/ReferenceQueue.java:218) at jdk.internal.ref.CleanerImpl.run(java.base@22/CleanerImpl.java:140) at java.lang.Thread.runWith(java.base@22/Thread.java:1583) at java.lang.Thread.run(java.base@22/Thread.java:1570) at jdk.internal.misc.InnocuousThread.run(java.base@22/InnocuousThread.java:186) "timeout-check-timer" #35 [40711] daemon prio=5 os_prio=31 cpu=23.70ms elapsed=18.60s tid=0x00007fa2320fc400 nid=40711 waiting on condition [0x0000700008e0e000] java.lang.Thread.State: TIMED_WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x0000000618663d40> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(java.base@22/LockSupport.java:269) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@22/AbstractQueuedSynchronizer.java:1758) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@22/ScheduledThreadPoolExecutor.java:1182) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@22/ScheduledThreadPoolExecutor.java:899) at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@22/ThreadPoolExecutor.java:1070) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@22/ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@22/ThreadPoolExecutor.java:642) at java.lang.Thread.runWith(java.base@22/Thread.java:1583) at java.lang.Thread.run(java.base@22/Thread.java:1570) "ping-timer-10s" #37 [36355] daemon prio=5 os_prio=31 cpu=1.39ms elapsed=18.60s tid=0x00007fa2b1d33a00 nid=36355 waiting on condition [0x0000700008f11000] java.lang.Thread.State: TIMED_WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x000000061863cfb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(java.base@22/LockSupport.java:269) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@22/AbstractQueuedSynchronizer.java:1758) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@22/ScheduledThreadPoolExecutor.java:1182) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@22/ScheduledThreadPoolExecutor.java:899) at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@22/ThreadPoolExecutor.java:1070) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@22/ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@22/ThreadPoolExecutor.java:642) at java.lang.Thread.runWith(java.base@22/Thread.java:1583) at java.lang.Thread.run(java.base@22/Thread.java:1570) "ThreadedStreamConsumer" #40 [40195] daemon prio=5 os_prio=31 cpu=31.61ms elapsed=18.53s tid=0x00007fa2a1da1e00 nid=40195 waiting on condition [0x0000700009014000] java.lang.Thread.State: WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x0000000603eafea0> (a org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$QueueSynchronizer$SyncT1) at java.util.concurrent.locks.LockSupport.park(java.base@22/LockSupport.java:221) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@22/AbstractQueuedSynchronizer.java:754) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@22/AbstractQueuedSynchronizer.java:1099) at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$QueueSynchronizer$SyncT1.waitIfZero(ThreadedStreamConsumer.java:237) at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$QueueSynchronizer.awaitNext(ThreadedStreamConsumer.java:280) at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:80) at java.lang.Thread.runWith(java.base@22/Thread.java:1583) at java.lang.Thread.run(java.base@22/Thread.java:1570) "process reaper (pid 53940)" #41 [36867] daemon prio=10 os_prio=31 cpu=0.28ms elapsed=18.50s tid=0x00007fa2320f9600 nid=36867 runnable [0x000070000903b000] java.lang.Thread.State: RUNNABLE at java.lang.ProcessHandleImpl.waitForProcessExit0(java.base@22/Native Method) at java.lang.ProcessHandleImpl$1.run(java.base@22/ProcessHandleImpl.java:163) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@22/ThreadPoolExecutor.java:1144) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@22/ThreadPoolExecutor.java:642) at java.lang.Thread.runWith(java.base@22/Thread.java:1583) at java.lang.Thread.run(java.base@22/Thread.java:1570) at jdk.internal.misc.InnocuousThread.run(java.base@22/InnocuousThread.java:186) "fork-1-err-thread" #43 [37379] daemon prio=5 os_prio=31 cpu=2.67ms elapsed=18.49s tid=0x00007fa2b1bd6200 nid=37379 runnable [0x000070000913e000] java.lang.Thread.State: RUNNABLE at java.io.FileInputStream.readBytes(java.base@22/Native Method) at java.io.FileInputStream.read(java.base@22/FileInputStream.java:287) at java.io.BufferedInputStream.read1(java.base@22/BufferedInputStream.java:345) at java.io.BufferedInputStream.implRead(java.base@22/BufferedInputStream.java:420) at java.io.BufferedInputStream.read(java.base@22/BufferedInputStream.java:405) - locked <0x0000000603f67450> (a java.lang.ProcessImpl$ProcessPipeInputStream) at java.io.BufferedInputStream.fill(java.base@22/BufferedInputStream.java:291) at java.io.BufferedInputStream.read1(java.base@22/BufferedInputStream.java:347) at java.io.BufferedInputStream.implRead(java.base@22/BufferedInputStream.java:420) at java.io.BufferedInputStream.read(java.base@22/BufferedInputStream.java:399) at org.apache.maven.surefire.api.util.internal.Channels$3.readImpl(Channels.java:169) at org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleReadableChannel.read(AbstractNoninterruptibleReadableChannel.java:50) at sun.nio.cs.StreamDecoder.readBytes(java.base@22/StreamDecoder.java:341) at sun.nio.cs.StreamDecoder.implRead(java.base@22/StreamDecoder.java:393) at sun.nio.cs.StreamDecoder.lockedRead(java.base@22/StreamDecoder.java:217) at sun.nio.cs.StreamDecoder.read(java.base@22/StreamDecoder.java:177) - locked <0x0000000603a738d8> (a sun.nio.cs.StreamDecoder) at java.io.Reader.read(java.base@22/Reader.java:216) at java.util.Scanner.readInput(java.base@22/Scanner.java:907) at java.util.Scanner.findWithinHorizon(java.base@22/Scanner.java:1822) at java.util.Scanner.hasNextLine(java.base@22/Scanner.java:1636) at org.apache.maven.surefire.extensions.util.LineConsumerThread.run(LineConsumerThread.java:68) "commands-fork-1" #44 [37635] daemon prio=5 os_prio=31 cpu=1.45ms elapsed=18.49s tid=0x00007fa2a1da1200 nid=37635 waiting on condition [0x0000700009241000] java.lang.Thread.State: WAITING (parking) at jdk.internal.misc.Unsafe.park(java.base@22/Native Method) - parking to wait for <0x000000061868b958> (a java.util.concurrent.Semaphore$NonfairSync) at java.util.concurrent.locks.LockSupport.park(java.base@22/LockSupport.java:221) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@22/AbstractQueuedSynchronizer.java:754) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@22/AbstractQueuedSynchronizer.java:1099) at java.util.concurrent.Semaphore.acquire(java.base@22/Semaphore.java:318) at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream.awaitNextCommand(TestLessInputStream.java:138) at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStream.beforeNextCommand(TestLessInputStream.java:116) at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.DefaultCommandReader.readNextCommand(DefaultCommandReader.java:68) at org.apache.maven.plugin.surefire.extensions.StreamFeeder.run(StreamFeeder.java:70) "fork-1-event-thread" #45 [38147] daemon prio=5 os_prio=31 cpu=4.18ms elapsed=18.48s tid=0x00007fa2320f9e00 nid=38147 runnable [0x0000700009344000] java.lang.Thread.State: RUNNABLE at java.io.FileInputStream.readBytes(java.base@22/Native Method) at java.io.FileInputStream.read(java.base@22/FileInputStream.java:287) at java.io.BufferedInputStream.read1(java.base@22/BufferedInputStream.java:345) at java.io.BufferedInputStream.implRead(java.base@22/BufferedInputStream.java:420) at java.io.BufferedInputStream.read(java.base@22/BufferedInputStream.java:405) - locked <0x0000000603f65338> (a java.lang.ProcessImpl$ProcessPipeInputStream) at java.io.BufferedInputStream.fill(java.base@22/BufferedInputStream.java:291) at java.io.BufferedInputStream.read1(java.base@22/BufferedInputStream.java:347) at java.io.BufferedInputStream.implRead(java.base@22/BufferedInputStream.java:420) at java.io.BufferedInputStream.read(java.base@22/BufferedInputStream.java:399) at org.apache.maven.surefire.api.util.internal.Channels$3.readImpl(Channels.java:169) at org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleReadableChannel.read(AbstractNoninterruptibleReadableChannel.java:50) at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:430) at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:419) at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readMessageType(AbstractStreamDecoder.java:116) at org.apache.maven.surefire.stream.EventDecoder.decode(EventDecoder.java:129) at org.apache.maven.plugin.surefire.extensions.EventConsumerThread.run(EventConsumerThread.java:69) "VM Thread" os_prio=31 cpu=8.27ms elapsed=21.57s tid=0x00007fa2a170b970 nid=17411 runnable "GC Thread#0" os_prio=31 cpu=13.58ms elapsed=21.59s tid=0x00007fa2a1707c20 nid=13571 runnable "GC Thread#1" os_prio=31 cpu=18.34ms elapsed=21.00s tid=0x00007fa2b1724d90 nid=43011 runnable "GC Thread#2" os_prio=31 cpu=19.94ms elapsed=21.00s tid=0x00007fa2b1725300 nid=33283 runnable "GC Thread#3" os_prio=31 cpu=13.89ms elapsed=21.00s tid=0x00007fa2b1725870 nid=33795 runnable "GC Thread#4" os_prio=31 cpu=18.32ms elapsed=21.00s tid=0x00007fa2a17143b0 nid=34307 runnable "GC Thread#5" os_prio=31 cpu=11.04ms elapsed=21.00s tid=0x00007fa2a1714920 nid=34563 runnable "GC Thread#6" os_prio=31 cpu=18.74ms elapsed=21.00s tid=0x00007fa2a1714e90 nid=34819 runnable "GC Thread#7" os_prio=31 cpu=19.45ms elapsed=21.00s tid=0x00007fa2b1725de0 nid=42243 runnable "GC Thread#8" os_prio=31 cpu=20.19ms elapsed=21.00s tid=0x00007fa2b1726350 nid=35587 runnable "GC Thread#9" os_prio=31 cpu=13.14ms elapsed=21.00s tid=0x00007fa2a1715400 nid=41987 runnable "G1 Main Marker" os_prio=31 cpu=0.24ms elapsed=21.59s tid=0x00007fa2a17083c0 nid=12035 runnable "G1 Conc#0" os_prio=31 cpu=5.58ms elapsed=21.59s tid=0x00007fa2a1708d40 nid=12547 runnable "G1 Conc#1" os_prio=31 cpu=5.53ms elapsed=19.44s tid=0x00007fa2b216bfe0 nid=41731 runnable "G1 Conc#2" os_prio=31 cpu=4.42ms elapsed=19.44s tid=0x00007fa2b2048a00 nid=41219 runnable "G1 Refine#0" os_prio=31 cpu=0.05ms elapsed=21.59s tid=0x00007fa2b280dc00 nid=21507 runnable "G1 Service" os_prio=31 cpu=3.06ms elapsed=21.59s tid=0x00007fa2b2008430 nid=20995 runnable "VM Periodic Task Thread" os_prio=31 cpu=14.99ms elapsed=21.58s tid=0x00007fa2b200a240 nid=16643 waiting on condition JNI global refs: 11, weak refs: 0 Heap garbage-first heap total reserved 8388608K, committed 126976K, used 63619K [0x0000000600000000, 0x0000000800000000) region size 4096K, 12 young (49152K), 2 survivors (8192K) Metaspace used 27719K, committed 28096K, reserved 1114112K class space used 3234K, committed 3392K, reserved 1048576K
28-03-2024

No, I haven't tested it because the information of how the maven project is organized is needed.
26-03-2024

[~tongwan] Have you tested it with main line?
21-03-2024

Requested more details from the submitter.
15-03-2024