Thread-Local Handshakes slowdown on single-cpu machines

Karakó Miklós palacsint at palacsint.hu
Mon Apr 27 21:26:05 UTC 2020


Hello,

We bumped into a possible Thread-Local Handshakes issue with multiple 
apps. It seems that enabled TLH slows down applications running on 
(although rare) single CPU boxes. I would be grateful if you could 
confirm that this is a known trade-off for these rare setups or a 
possible JVM bug. That would save us at least a few hours of debugging.

TL;DR: Both tested apps stop frequently around "HandshakeOneThread", 
"HandshakeAllThreads" and "Revoked bias of currently-unlocked object" 
running with OpenJDK12/OpenJDK13/OpenJDK14. OpenJDK 13 with 
-XX:-ThreadLocalHandshakes fixes the issue. Adding a second CPU to the 
virtual machine fixes the issue. Enabling hyper-threading fixes the issue.

More details are available at StackOverflow: 
https://stackoverflow.com/questions/61375565/slow-application-frequent-jvm-hangs-with-single-cpu-setups-and-java-12

All thoughts are welcome.

Best,
Miklos



More information about the hotspot-dev mailing list