Spring Boot 3.4.0 (WebMVC, Virtual Threads, Lazy Init) pins virtual threads if accessing /actuator/health during launch #33958
Labels
status: waiting-for-triage
An issue we've not yet triaged or decided on
Problem
When using Spring Boot 3.4.0 combined with Spring WebMVC, virtual threads, and lazy bean initialization, accessing
/actuator/health
during the application launch results in a pinned virtual thread.This is a regression from Spring Boot 3.3.6 where this issue does not occur.
Sample App
This issue is demonstrated in https://github.com/chrisgleissner/spring-boot-3.4-pinned-thread-during-launch-issue:
Details
Software Versions
Source code
build.gradle.kts
:src/main/java/com/example/demo/DemoApplication.java
:src/main/resources/application.yaml
:Expected Logs (Spring Boot 3.3.6)
No thread pinning detected.
Actual Logs (Spring Boot 3.4.0)
Thread pinning detected.
Monitors
This section shows the relevant code for each of the stack trace lines ending with
<== monitors:1
in the stack trace above.Monitor
Log:
Code:
Monitor
Log:
Code:
Monitor
Log:
Code:
The text was updated successfully, but these errors were encountered: