[Mono-bugs] [Bug 31177][Maj] New - Accept in Socket code has a race condition.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
25 Sep 2002 02:47:18 -0000
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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=31177
--- shadow/31177 Tue Sep 24 22:47:18 2002
+++ shadow/31177.tmp.4922 Tue Sep 24 22:47:18 2002
@@ -0,0 +1,59 @@
+Bug#: 31177
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: dick@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Accept in Socket code has a race condition.
+
+While running the Mono XSP.EXE server and trying to debug it, I get the
+following error, you have to run this twice. I get an InvalidArguments.
+
+Now, if I try to strace the problem, the program works; If I run it with
+--trace, the program fails. So my guess is that there is some race
+condition. There are no threads involved.
+
+mono$ mono server.exe 9001
+Remember that you should rerun the server if you change
+the aspx file!
+Server started.
+** Message:
+ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal:
+returning 10022
+
+Unhandled Exception: System.Net.Sockets.SocketException: Invalid arguments
+in (unmanaged) 06 System.Net.Sockets.Socket:Accept_internal (intptr)
+in <0x00004> 06 System.Net.Sockets.Socket:Accept_internal (intptr)
+in <0x0000e> 00 System.Net.Sockets.Socket:Accept ()
+in <0x0003c> 00 System.Net.Sockets.TcpListener:AcceptTcpClient ()
+in <0x00048> 00 Mono.ASP.Server:RunServer ()
+in <0x00057> 01 System.MulticastDelegate:invoke_void ()
+
+mono$ mono server.exe 9001
+Remember that you should rerun the server if you change
+the aspx file!
+** Message:
+ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal:
+returning 10048
+
+Unhandled Exception: System.Net.Sockets.SocketException: Address already in use
+in (unmanaged) 06 System.Net.Sockets.Socket:Bind_internal
+(intptr,System.Net.SocketAddress)
+in <0x00004> 06 System.Net.Sockets.Socket:Bind_internal
+(intptr,System.Net.SocketAddress)
+in <0x00055> 00 System.Net.Sockets.Socket:Bind (System.Net.EndPoint)
+in <0x00028> 00 System.Net.Sockets.TcpListener:.ctor (System.Net.IPEndPoint)
+in <0x0008d> 00 Mono.ASP.Server:Start ()
+in <0x00487> 00 Mono.ASP.Server:Main (string[])
+
+Now, the issue