查询时,线程一直处于RUNNABLE
查询死锁问题
在Tomcat的线程中,有很多一直处理运行状态,用jstack跟踪,发现在查询时死锁了,神马情况,请大家帮忙解答下,谢谢!
"http-2010-3" daemon prio=10 tid=0x000000005d6f5c00 nid=0x1a58 runnable [0x00000000427d3000..0x00000000427d3b90]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:826)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:707)
- locked <0x00002aaab3b20e98> (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:3870)
at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1042)
- locked <0x00002aaab3b25d38> (a net.sourceforge.jtds.jdbc.TdsCore)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:406)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693)
- locked <0x00002aaab3b20978> (a net.sourceforge.jtds.jdbc.ConnectionJDBC3)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at com.test.DataProvider.execQuery(CustomProvider.java:728)
at com.test.DataProvider.execute(CustomProvider.java:212)
at com.test.HelloWorld.doPost(HelloWorld.java:361)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
------解决方案--------------------
要查询的数据可能被其他事务占用中,该事务也许处理完毕后没有commit
------解决方案--------------------
soket没有关闭吧
是否一致在等待接收数据.............
------解决方案--------------------
- locked <0x00002aaab3b25d38> (a net.sourceforge.jtds.jdbc.TdsCore)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:406)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693)
- locked <0x00002aaab3b20978> (a net.sourceforge.jtds.jdbc.ConnectionJDBC3)
这里没有死锁?
------解决方案--------------------哎,最头疼这种问题了,什么烂玩意
------解决方案--------------------要查询的数据可能被其他事务占用中,该事务也许处理完毕后没有commit