如何确保我的代码发生阻塞

时间:2013-02-04 09:29:01

标签: deadlock thread-dump

最近我有一个被阻塞的线程情况。

该线程说下面的

"TP-Processor338" daemon prio=10 tid=0x00002aaabd753800 nid=0x37ee runnable   [0x0000000046681000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.DataInputStream.readFully(DataInputStream.java:178)
at java.io.DataInputStream.readFully(DataInputStream.java:152)
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:846)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:727)
- locked <0x00000007486f6530> (a java.util.ArrayList)
at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
at net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:88)
at net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3932)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1046)
- locked <0x00000007486f8ae8> (a net.sourceforge.jtds.jdbc.TdsCore)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:537)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:504)
- locked <0x00000007486f8870> (a net.sourceforge.jtds.jdbc.ConnectionJDBC3)
at my.jdbcwrapper.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:261)
at my.persistence.media.Media_HJMPWrapper$MediaEntityState.storeChanges(Media_HJMPWrapper.java:1736)
at my.persistence.media.Media_HJMPWrapper.ejbStore(Media_HJMPWrapper.java:228)
at my.persistence.framework.RemoteInvocationHandler.performOther(RemoteInvocationHandler.java:196)
- locked <0x000000069c327028> (a my.persistence.framework.PKSyncUtils$PKSyncObject)
at my.persistence.framework.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:105)
at $Proxy101.setProperty(Unknown Source)

在0x000000069c327028锁上有大约200多个线程被阻止。

PKSyncUtils $ PKSyncObject或其他内容是否存在锁定问题。

1 个答案:

答案 0 :(得分:0)

此问题已解决。问题出在JTDS驱动程序中。