问题描述
如果java层面发生了死锁,当我们使用jstack
命令的时候其实是可以将死锁的信息给dump出来的,在dump结果的最后会有类似Found one Java-level deadlock:
的关键字,接着会把发生死锁的线程的堆栈及对应的同步锁给打印出来,这次碰到一个系统就发生类似的问题,不过这个dump文档里虽然提到了如下的死锁信息:
1
2
3
4
5
6
7
8
9
10
11
|
Found one Java-level deadlock:
=============================
"worker-1-thread-121":
waiting to lock monitor 0x00007f3758209dc8 (object 0x0000000764cd2b20, a java.util.concurrent.ConcurrentHashMap),
which is held by "HSFBizProcessor-4-thread-4"
"HSFBizProcessor-4-thread-4":
waiting to lock monitor 0x00007f3758289260 (object 0x000000076073ddc8, a com.alipay.cloudengine.extensions.equinox.KernelBundleClassLoader),
which is held by "HSFBizProcessor-4-thread-5"
"HSFBizProcessor-4-thread-5":
waiting to lock monitor 0x00007f3758253420 (object 0x00000007608e6fc8, a com.alipay.cloudengine.extensions.equinox.KernelBundleClassLoader),
which is held by "HSFBizProcessor-4-thread-4"
|
但是我们在堆栈里搜索对应的锁的时候并没发现,也就是上面提到的
1
|
object 0x00000007608e6fc8 which is held by "HSFBizProcessor-4-thread-4"
|
我们在HSFBizProcessor-4-thread-4
这个线程的堆栈里并没有看到对应的持锁信息。
附上线程dump详情
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
Found one Java-level deadlock:
=============================
"worker-1-thread-121":
waiting to lock monitor 0x00007f3758209dc8 (object 0x0000000764cd2b20, a java.util.concurrent.ConcurrentHashMap),
which is held by "HSFBizProcessor-4-thread-4"
"HSFBizProcessor-4-thread-4":
waiting to lock monitor 0x00007f3758289260 (object 0x000000076073ddc8, a com.alipay.cloudengine.extensions.equinox.KernelBundleClassLoader),
which is held by "HSFBizProcessor-4-thread-5"
"HSFBizProcessor-4-thread-5":
waiting to lock monitor 0x00007f3758253420 (object 0x00000007608e6fc8, a com.alipay.cloudengine.extensions.equinox.KernelBundleClassLoader),
which is held by "HSFBizProcessor-4-thread-4"
Java stack information for the threads listed above:
===================================================
"worker-1-thread-121":
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:180)
- waiting to lock <0x0000000764cd2b20> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:455)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317)
......
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.
|