[Mono-bugs] [Bug 32054][Nor] Changed - Sockets are sometimes garbage collected while still in use

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
12 Nov 2002 15:33: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 dick@ximian.com.


--- shadow/32054	Thu Oct 10 10:01:25 2002
+++ shadow/32054.tmp.32620	Tue Nov 12 10:33:18 2002
@@ -84,6 +84,21 @@
 ------- Additional Comments From timothyjmills@hotmail.com  2002-10-10 05:45 -------
 Created an attachment (id=2511)
 Same problem shows up with synchronous reads
+------- Additional Comments From dick@ximian.com  2002-11-12 10:33 -------
+Looking at the asynchronous test, I think whats going on here is that
+the SocketGCBug instance created in Loop() is losing all references,
+while the async GetMessage() method is still running.  The SocketGCBug
+is being collected, thereby leaving the stream unreferenced which can
+then also be collected.  This gives the Write exception symptom.
+If you add newClient to a static array as it is created, the problem
+goes away.
+Therefore I think the fix here is to make sure the SocketGCBug
+instance still has references while asynchronous methods are
+executing.  Investigating further...