Netflix engineers encountered issues with virtual threads in Java 21 causing timeouts and hung instances in their microservices running on SpringBoot 3 and embedded Tomcat. Detailed diagnostics revealed that virtual threads were waiting for reentrant locks, with OS threads pinned and unable to release, leading to a variation of
Table of contents
Java 21 Virtual Threads - Dude, Where’s My Lock?IntroThe problemCollected diagnosticsAnalysisWhy is Tomcat stuck?Who has the lock?Inspecting the lockSort: