[Mono-bugs] [Bug 430040] TcpClient breaks after 1000 consecutive connections

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 3 12:17:02 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=430040

User webservices at landmarkdigital.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=430040#c6





--- Comment #6 from WebServices Group <webservices at landmarkdigital.com>  2008-10-03 10:17:02 MDT ---
I have attached two archives which should enable you to manifest the described
symptoms.

The BugReportService.tgz attachment
(https://bugzilla.novell.com/attachment.cgi?id=243398) contains the source and
binary for a web service.  In testing, I was running the service with the xsp2
utility.  The service contains a single method which accepts a hostname, a port
number, and a byte array as parameters.  The method attempts to create a
TCPClient connection with the specified host on the specified port, but does
not read or write anything on the socket.  The byte array parameter is unused,
but is apparently necessary to manifest the bug; when I removed that parameter,
the bug did not manifest.

The BugReportClient.zip attachment
(https://bugzilla.novell.com/attachment.cgi?id=243399) contains the source and
binary for a VisualStudio/.Net client to the above web service.  The client
application creates ten threads which each repeatedly invoke the web service
200 times.  In testing, I have been connecting either to a host on my own
network or to a remote host (google.com).  Both scenarios trigger an error, but
the local network host error is different from the remote network host error. 
Apparently after 1012 successful connections, the remote network host
(google.com, port 80) scenario triggers the error:

System.Net.Sockets.SocketException: No such host is known
  at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] 
  at System.Net.Sockets.TcpClient.Connect (System.String hostname, Int32 port)
[0x00000] 
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, Int32 port)
[0x00000] 
  at BugReport.BugReportService.Connect (System.String serverName, Int32 port,
System.Byte[] data) [0x00000]

whereas the local network host scenario cast triggers the error:

System.Net.Sockets.SocketException: Too many open files
  at System.Net.Sockets.Socket..ctor (AddressFamily family, SocketType type,
ProtocolType proto) [0x00000] 
  at System.Net.Sockets.TcpClient.Init (AddressFamily family) [0x00000] 
  at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses,
Int32 port) [0x00000] 
  at System.Net.Sockets.TcpClient.Connect (System.String hostname, Int32 port)
[0x00000] 
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, Int32 port)
[0x00000] 
  at BugReport.BugReportService.Connect (System.String serverName, Int32 port,
System.Byte[] data) [0x00000]


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


More information about the mono-bugs mailing list