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 deadlock. The investigation and resolution process underscores the challenges and potential of adopting virtual threads for improved performance.

12m read timeFrom netflixtechblog.com
Post cover image
Table of contents
Java 21 Virtual Threads - Dude, Where’s My Lock?IntroThe problemCollected diagnosticsAnalysisWhy is Tomcat stuck?Who has the lock?Inspecting the lock

Sort: