The Solution of JAVA Deadlock

Solve the problem:

1. 使用 jps -l 定位进程号

insert image description here
Remember our process number

2. 使用 jstack 进程号 找到死锁问题

insert image description here
Turn to the end and see that Found 2 deadlock issued a deadlock.
insert image description here
Thread 1 locks 0x000000076b740578 and wants to acquire 0x000000076b740540 lock.
Thread 0 locks 0x000000076b740540 and wants to acquire 0x000000076b740578
lock. , leading to blocking here

Guess you like

Origin blog.csdn.net/qq_42673067/article/details/129974115