We have exactly as Artifact 1086156 a hanging Thread while we send a Query to the Database. The whole Application got freezed.
The used Database is MSSQL 2000 Enterprise Edition Service Pack 3 on a Windows 2008 32bit Server. The Clients gets connected with the jTDS 1.2.5 driver to the Server.
Following Threaddump we made during the Application hang:
"AWT-EventQueue-0" prio=6 tid=0x3da58ae0 nid=0x144c runnable [0x3e4ee000..0x3e4efb6c]
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:842)
at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:723)
- locked <0x05e1a8b8> (a java.util.ArrayList)
at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
at net.sourceforge.jtds.jdbc.ResponseStream.readUnicodeString(ResponseStream.java:238)
at net.sourceforge.jtds.jdbc.TdsCore.tds7ResultToken(TdsCore.java:2530)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2230)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:943)
at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541)
at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:424)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:778)
- locked <0x040bf2b8> (a net.sourceforge.jtds.jdbc.ConnectionJDBC3)
Looking through our code I don't see what could cause the driver to stop responding, beside the case that the server process crashed or freezed somehow and simply doesn't send any more data, but doesn't close the connection neither.
This hang might be avoidable by enabling the socketkeepAlive-option. If you still see this error, please check if that solves the problem and report here.
I'll close this bug for now, but will be happy to reopen it as soon as there is a way to reproduce it.
Cheers,
momo