ConcurrentHashMap一直卡住bug
目录
jdk11 ConcurrentHashMap bug,会一直卡在这里:
"main" #1 prio=5 tid=0x00007f4bd8029800 nid=0xbd75 runnable [0x00007f4bde485000]
java.lang.Thread.State: RUNNABLE
JavaThread state: _thread_in_vm_trans
- java.util.concurrent.ConcurrentHashMap.transfer(java.util.concurrent.ConcurrentHashMap$Node[], java.util.concurrent.ConcurrentHashMap$Node[]) @bci=338, line=2477 (Compiled frame)
- locked <0x000000011bc70b38> (a java.util.concurrent.ConcurrentHashMap$ReservationNode)
- java.util.concurrent.ConcurrentHashMap.addCount(long, int) @bci=276, line=2348 (Compiled frame)
- java.util.concurrent.ConcurrentHashMap.computeIfAbsent(java.lang.Object, java.util.function.Function) @bci=570, line=1773 (Compiled frame)
- org.springframework.cache.concurrent.ConcurrentMapCache.get(java.lang.Object, java.util.concurrent.Callable) @bci=14, line=142 (Compiled frame)
jdk17中该方法修复:
else if (f instanceof ReservationNode)
throw new IllegalStateException("Recursive update");
---
本文来自博客园,作者:Bingmous,转载请注明原文链接:https://www.cnblogs.com/bingmous/p/17920083.html