[Mono-bugs] [Bug 470120] Socket.EndSend unexpectedly fails with WSAEWOULDBLOCK

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 17 13:40:55 EDT 2009


User benoit at zeroc.com added comment

--- Comment #5 from Benoit Foucher <benoit at zeroc.com>  2009-07-17 11:40:54 MDT ---
Created an attachment (id=305906)
 --> (http://bugzilla.novell.com/attachment.cgi?id=305906)

Here's a very simple test case for this bug... it chains BeginSend calls (the
server isn't reading). After a bunch of calls, it eventually fails with an
unexpected SocketException and EWOULDBLOCK (my guess is that this occurs when
the send buffer fills up...).

Tested on OS X 10.5.7 with:

macbookpro:~/Downloads/bug-377589_testcase$ mono -V
Mono JIT compiler version 2.4.2 (tarball Thu Jun 25 22:58:40 MDT 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none

Compile the test case:
    $ mcs TcpClient.cs
    $ mcs TcpServer.cs

Run the test case:

macbookpro:~/Downloads/bug-377589_testcase$ mono TcpServer.exe 
Press Enter to exit

macbookpro:~/Downloads/bug-377589_testcase$ mono TcpClient.exe 
Unexpected exception:
System.Net.Sockets.SocketException: Operation on non-blocking socket would
  at System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException
() [0x00000] 
  at System.Net.Sockets.Socket.EndSend (IAsyncResult asyncResult,
System.Net.Sockets.SocketError& errorCode) [0x00000] 
  at System.Net.Sockets.Socket.EndSend (IAsyncResult result) [0x00000] 
  at TcpClient.AppMain.OnSend (IAsyncResult ar) [0x00000] 
Press Enter to exit

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list