Possible bug in sockets



I've seen a few people that seem to be seeing the same problem I have, but no resolution so far. If this is a dotnet bug, it is VERY serious. If any MS or people with MS contacts can forward this along that would be good =)

At this link I have two c# projects, one is a client, the other is a
server. Just point the ip address of the client at the server


http://www.slip-angle.com/host?ed/bug/


The server does little more than the examples in the c# documentation
for how to set up an asynchronous server. It just accepts connections,
reads data into a buffer continously, doing nothing with it.


The client connects 200 sockets, sends some data with each continously,
and occasionally disconnects a socket and reconnects a new one.


Things of note:


1. in this scenario memory increases forever. Not just the private
bytes but the gen2 heap increases forever, even after a forced gen2
garbage collection


2. memory profilers indicate no left behind object references


3.the memory profiler indicates "holes" in the gen2 heap, which can be
caused by "pinned objects". I think perhaps that the data in the
receive buffers is being held onto indefinitely, despite all sockets
being closed on the server.


4. If you change the client to not send any data, the memory will not
increase. If you change the client to not disconnect and reconnect any
sockets, memory will not increase.


If someone can verify if this is a .net bug, or point out my idiocy I
would greatly appreciate it.



--------------------------------
From: Jack Mott

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>2VWTeSiMnkWLnvL1Kt6/qA==</Id>
.



Relevant Pages

  • Re: Memory usage and large number of pages
    ... The problem is the overhead of compiling these pages is huge - and because ... have also found that for each file that is compiled the memory increases. ... >> directory on the web server. ... >> returns the result of this page back to the client. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Asynchronous socket programming vs. remoting
    ... You are the first person that said I should use sockets. ... them quicker than I can load them from my harddrive using the file system. ... It scales nice too - I tried throwing 400 requests at the server in a span ... > do not need the same assembly on the client and server. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Named shared memory without synchronization
    ... memory address with a single machine instruction. ... Again, if I assume an x86/x64 architecture I think i can get away with this, ... when running on a 4-way server under heavy load. ... Server runs client. ...
    (microsoft.public.vc.language)
  • RE: Exchange 2003 and timeout errors on XP machines
    ... After replacing 1 client computer's network cable, ... Are you able to open OWA to access the e-mails on the client or server? ... Store.exe will take as much memory as possible to provide better service ... Microsoft engineers can only focus on one issue per thread. ...
    (microsoft.public.windows.server.sbs)
  • Re: Emulating I/O Completion Port on Win98.
    ... or for GUI programs - use async I/O ... > My Client is an FTP Client and I thought emulating IOCP would be the best ... > solution under Win98 to quickly copy a big file from the FTP Server. ... >>> monitor thread created dedicates to check the IO status of the sockets ...
    (microsoft.public.win32.programmer.networks)