[Mono-bugs] [Bug 47429][Wis] New - Closed SqlConnections are put back into the connection pool.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 6 Aug 2003 10:35:51 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joergr@voelcker.com.

http://bugzilla.ximian.com/show_bug.cgi?id=47429

--- shadow/47429	Wed Aug  6 10:35:51 2003
+++ shadow/47429.tmp.8588	Wed Aug  6 10:35:51 2003
@@ -0,0 +1,92 @@
+Bug#: 47429
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System.Data.SqlClient
+AssignedTo: rodrigo@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Closed SqlConnections are put back into the connection pool.
+
+Description of Problem:
+If a connection is closed by an external event (network problem, etc.) it
+is pushed back into the connection pool. The next Open call retrieves this
+invalid connection which leads to exceptions when executing statements.
+
+Steps to reproduce the problem:
+1. Set a valid connection string in the attached sample.
+2. Compile it.
+3. Run.
+4. Kill connection using statement 'kill <number>' when the application
+prompts you.
+
+Actual Results:
+User tables: 354
+Kill connection of test application and press Enter!
+
+Exception caught: System.IO.IOException: Write failure --->
+System.Net.Sockets.SocketException: The socket has been shut down
+in (unmanaged)
+/home/viadmin/mono-cvs/install/lib/libmono.so.0(mono_raise_exception+0x22)
+[0x400ace86]
+in (unmanaged) /home/viadmin/mono-cvs/install/lib/libmono.so.0 [0x400cecd5]
+in [0x0005b] (at
+/home/viadmin/mono-cvs/mcs/class/System/System.Net.Sockets/Socket.cs:979)
+00 System.Net.Sockets.Socket:Send
+(byte[],int,int,System.Net.Sockets.SocketFlags)
+in [0x0006e] (at
+/home/viadmin/mono-cvs/mcs/class/System/System.Net.Sockets/Socket.cs:981)
+00 System.Net.Sockets.Socket:Send
+(byte[],int,int,System.Net.Sockets.SocketFlags)
+in [0x00057] (at
+/home/viadmin/mono-cvs/mcs/class/System/System.Net.Sockets/NetworkStream.cs:292)
+00 System.Net.Sockets.NetworkStream:Write (byte[],int,int)
+--- End of inner exception stack trace ---
+
+in [0x0006e] (at
+/home/viadmin/mono-cvs/mcs/class/System/System.Net.Sockets/NetworkStream.cs:294)
+00 System.Net.Sockets.NetworkStream:Write (byte[],int,int)
+in [0x00094] (at
+/home/viadmin/mono-cvs/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs:442)
+00 Mono.Data.Tds.Protocol.TdsComm:SendPhysicalPacket (bool)
+in [0x00002] (at
+/home/viadmin/mono-cvs/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs:425)
+00 Mono.Data.Tds.Protocol.TdsComm:SendPacket ()
+in [0x00042] (at
+/home/viadmin/mono-cvs/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:227)
+00 Mono.Data.Tds.Protocol.Tds:ExecuteQuery (string,int,bool)
+in <0x0008c> 08 Mono.Data.Tds.Protocol.Tds:ExecuteQuery (string,int,bool)
+in [0x00047] (at
+/home/viadmin/mono-cvs/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs:256)
+00 Mono.Data.Tds.Protocol.Tds70:Execute
+(string,Mono.Data.Tds.TdsMetaParameterCollection,int,bool)
+in [0x00166] (at
+/home/viadmin/mono-cvs/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:272)
+00 System.Data.SqlClient.SqlCommand:Execute (System.Data.CommandBehavior,bool)
+in <0x0007a> 08 System.Data.SqlClient.SqlCommand:Execute
+(System.Data.CommandBehavior,bool)
+in [0x0000e] (at
+/home/viadmin/mono-cvs/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:318)
+00 System.Data.SqlClient.SqlCommand:ExecuteScalar ()
+in <0x00148> 00 Bug.MainClass:Main ()
+
+
+Expected Results:
+User tables: 354
+Kill connection of test application and press Enter!
+
+User tables: 354
+
+
+How often does this happen? 
+Always.
+
+Additional Information: