Search
Closed
as External Help for as External

10
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 483322
Opened: 8/17/2009 6:26:18 AM
Access Restriction: Public
0
Workaround(s)
12
User(s) can reproduce this bug
Could happen when the Database Connection broke physically.

We use Microsoft Jdbc 2.0 Driver with XA Transactions
Details (expand)
Product Language
English

Version

SQL Server 2005 SP3

Category

Tools (SSMS, Agent, Profiler, etc.)

Operating System

Win2003 Standard Server (SP2)
Operating System Language
English
Steps to Reproduce
There is a bug in the Driver 2.0 when closing a prepared statement while underlying conncetion is already closed.
To reproduce use the Example from http://msdn.microsoft.com/en-us/library/aa342335(SQL.90).aspx
but modify it to
try{
pstmt.setInt(1,1);
pstmt.setString(2,xid.toString());
pstmt.executeUpdate();
}finally{
pstmt.close();
}
Now run the Program and pause at "try{". Cancel Database Connection by shutting down or blocking the port with a firewall.
pstmt.isClosed() = false but pstmt.getConnection().isClosed()= true
when pstmt.close(); is executed the CPU goes up to 100% and FINEST Logging shows a infintiy loop of
Actual Results
ENTRY
com.microsoft.sqlserver.jdbc.SQLServerConnection:2 close
com.microsoft.sqlserver.jdbc.TDSCommand close
TDSCommand@25474e45 (SQLServerPreparedStatement:4 executeXXX): close ignoring error processing response: Connection reset
com.microsoft.sqlserver.jdbc.TDSChannel read
TDSChannel (ConnectionID:2) read failed:Connection reset
com.microsoft.sqlserver.jdbc.SQLServerException logException
SQLException:ConnectionID:2 com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset Connection reset
com.microsoft.sqlserver.jdbc.SQLServerException logException
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1355)com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1532)(IOBuffer.java:3274)(IOBuffer.java:3227)(IOBuffer.java:3203)(IOBuffer.java:3420)com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:50)com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:39)com.microsoft.sqlserver.jdbc.SQLServerStatement.processExecuteResults(SQLServerStatement.java:1064)com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.processResponse(SQLServerPreparedStatement.java:345)com.microsoft.sqlserver.jdbc.TDSCommand.close(IOBuffer.java:4111)com.microsoft.sqlserver.jdbc.SQLServerStatement.discardLastExecutionResults(SQLServerStatement.java:99)com.microsoft.sqlserver.jdbc.SQLServerStatement.closeInternal(SQLServerStatement.java:592)com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.closeInternal(SQLServerPreparedStatement.java:170)com.microsoft.sqlserver.jdbc.SQLServerStatement.close(SQLServerStatement.java:604)testXA.main(testXA.java:73)
com.microsoft.sqlserver.jdbc.SQLServerPooledConnection notifyEvent
SQLServerXAConnection:1 Exception:com.microsoft.sqlserver.jdbc.SQLServerException: Connection resetConnectionID:2
com.microsoft.sqlserver.jdbc.SQLServerConnection:2 close
Expected Results
Exception that the Underlying Connection is closed
Platform
32
File Attachments
2 attachments
logging.properties
testXA.java
Sign in to post a comment.
Posted by etotori on 9/16/2009 at 6:10 PM
I encounter this problem with Oracle Weblogic 10.3 . When Weblogic connection pooling is refreshed after SQL Server 2008 reboot, this Bug prevents connection pooling from being refreshed.(looks like hang)
Posted by Microsoft on 11/2/2009 at 3:35 PM
Hi we have fixed this item in the next release slated to be released in Year 2010. If you need to have this fixed before that you have to contact the Microsoft support services, who may be able to provide you with a hotfix.