J
jack
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/hosted/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.
server. Just point the ip address of the client at the server
http://www.slip-angle.com/hosted/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.