[Mono-bugs] [Bug 75812][Min] New - Unhandled Exceptions when
closing Sockets (Asynchronous IO)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Aug 14 11:09:57 EDT 2005
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 schwimmlehrer at hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75812
--- shadow/75812 2005-08-14 11:09:57.000000000 -0400
+++ shadow/75812.tmp.2428 2005-08-14 11:09:57.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 75812
+Product: Mono: Class Libraries
+Version: 1.1
+OS: SUSE 9.2
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: schwimmlehrer at hotmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Unhandled Exceptions when closing Sockets (Asynchronous IO)
+
+Description of Problem:
+I am closing a connection on a socket client and get a lot of unhandled
+exceptions on the server.
+
+Steps to reproduce the problem:
+1. Send some messages from the client to the server over a socket (server
+uses asynchronous methods)
+2. Close the client
+
+Actual Results:
+Server shows a lot of unhandled exceptions:
+
+Unhandled Exception: System.InvalidOperationException: Operation is not
+valid due to the current state of the object
+in [0x00063] (at
+/tmp/scratch/BUILD/mono-1.1.8.3/mcs/class/corlib/System.Collections/Queue.cs:168)
+System.Collections.Queue:Dequeue ()
+in <0x000cb> System.Net.Sockets.Socket+SocketAsyncResult:Complete ()
+in <0x0000d> System.Net.Sockets.Socket+SocketAsyncResult:CompleteDisposed
+(System.Object unused)
+in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object
+(object)
+
+Expected Results:
+No exception.
+
+How often does this happen?
+Always
+
+Additional Information:
+
+Here are the relevant lines from source code:
+
+From Socket.cs:
+ if (queue != null) {
+ SocketAsyncCall sac = null;
+ SocketAsyncResult req = null;
+ lock (queue) {
+ queue.Dequeue (); // remove ourselves
+ if (queue.Count > 0) {
+ req = (SocketAsyncResult) queue.Peek ();
+
+queue seems to be empty, therefore Dequeue fails (from Queue.cs):
+ public virtual object Dequeue ()
+ {
+ _version++;
+ if (_size < 1)
+ throw new InvalidOperationException ();
More information about the mono-bugs
mailing list