Stop Ignoring Monitor Contention: Debugging Virtual Thread Latency in the JEP 491 Post-Pinning Era

With JEP 491 finally resolving virtual thread pinning during synchronized blocks, many engineers assumed their concurrency bottlenecks were gone. They were wrong; instead, we are seeing a massive rise in silent latency spikes caused by monitor contention and carrier thread scheduler queuing overhead.

Why Most Developers Get This Wrong

Relying on dead metrics: Looking for jdk.VirtualThreadPinned JFR events, which are now silent because virtual threads cleanly unmount instead of pinning.

Ignoring scheduling overhead: Forgetting that unmounting and rescheduling thousands of virtual threads on a limited ForkJoinPool carrier pool creates massive queuing latency.