[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
13 Nov 2002 16:24:19 -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.

http://bugzilla.ximian.com/show_bug.cgi?id=32054

--- shadow/32054	Tue Nov 12 10:33:18 2002
+++ shadow/32054.tmp.25596	Wed Nov 13 11:24:19 2002
@@ -1,13 +1,13 @@
 Bug#: 32054
 Product: Mono/Runtime
 Version: unspecified
 OS: Red Hat 7.2
 OS Details: 
-Status: ASSIGNED   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: dick@ximian.com                            
 ReportedBy: timothyjmills@hotmail.com               
 QAContact: mono-bugs@ximian.com
@@ -98,7 +98,19 @@
 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...
+
+
+------- Additional Comments From dick@ximian.com  2002-11-13 11:24 -------
+OK, further poking reveals that it was purely a socket bug after all.
+
+The Socket.Close() method closed the file descriptor, but so did the
+finalizer.  Unfortunately the file descriptor had been reused for the
+next loop, and it was prematurely closed when an old, now unreferenced
+Socket was finalized, causing the exception.  Adding SocketGCBug to a
+static array stops all finalization, and so it hides the real problem.
+
+Fixed in CVS.