我如何解决java中的死锁问题

时间:2015-05-07 22:47:36

标签: java multithreading deadlock

发现一个Java级死锁:

"螺纹-13&#34 ;:   等待锁定监视器0x000000000b297688(对象0x00000000ef3c3528,一个com.xxx.models.SCSToolScript),   这是由" Thread-11"

"螺纹-11&#34 ;:   等待锁定监视器0x000000000b297738(对象0x00000000fd777fd0,一个java.lang.Object),   由" Thread-13"

持有

上面列出的线程的Java堆栈信息:

"螺纹-13&#34 ;:     在com.xxx.models.SCSToolScript.isStopped(SCSToolScript.java:116)
     - 等待锁定< 0x00000000ef3c3528> (com.xxx.models.SCSToolScript)     在com.xxx.actions.SCSToolManager.isStopped(SCSToolManager.java:352)
     - 已锁定< 0x00000000fd777fd0> (一个java.lang.Object)     at com.xxx.actions.ExecuteScript.checkStopped(ExecuteScript.java:1620)     at com.xxx.actions.ExecuteScript.RCCommand(ExecuteScript.java:745)     at com.xxx.actions.ExecuteScript.access $ 800(ExecuteScript.java:37)     at com.xxx.actions.ExecuteScript $ SCSThread.run(ExecuteScript.java:2112)     在java.lang.Thread.run(Thread.java:745)

"螺纹-11&#34 ;:     在com.xxx.actions.SCSToolManager.isPaused(SCSToolManager.java:346)
     - 等待锁定< 0x00000000fd777fd0> (一个java.lang.Object)     at com.xxx.actions.ExecuteScript.checkPaused(ExecuteScript.java:1616)     在com.xxx.actions.ExecuteScript.RCCommand(ExecuteScript.java:751)
     - 已锁定< 0x00000000ef3c3528> (com.xxx.models.SCSToolScript)     at com.xxx.actions.ExecuteScript.access $ 800(ExecuteScript.java:37)     at com.xxx.actions.ExecuteScript $ SCSThread.run(ExecuteScript.java:2112)     在java.lang.Thread.run(Thread.java:745)

发现1死锁。

0 个答案:

没有答案