[Mono-bugs] [Bug 79397][Blo] New - runtime crash when socket handle greater than 1215
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Sep 14 13:44:10 EDT 2006
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 stan at ntotem.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79397
--- shadow/79397 2006-09-14 13:44:10.000000000 -0400
+++ shadow/79397.tmp.22058 2006-09-14 13:44:10.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 79397
+Product: Mono: Runtime
+Version: 1.1
+OS: unknown
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Blocker
+Component: io-layer
+AssignedTo: dick at ximian.com
+ReportedBy: stan at ntotem.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: runtime crash when socket handle greater than 1215
+
+Description of Problem:
+
+when you have numerous sockets oppened, runtime will crash on select() or
+poll() if socket handle > 1215
+
+you may then never have more than 1215 openned sockets.
+
+may be related to http://bugzilla.ximian.com/show_bug.cgi?id=71203
+
+
+
+
+Steps to reproduce the problem:
+1. ensure to remove system limit for file descriptors (debian : ulimit -n 2048)
+
+2. create sockets until you have more than 1215 sockets
+select() or poll() on a socket with handle=1216 will crash
+
+test code :
+static void Main(string[] args)
+ {
+ ArrayList remember =new ArrayList();
+ // test for crash
+ while (remember.Count<10000)
+ {
+ Socket s = new Socket(AddressFamily.InterNetwork,
+SocketType.Stream, ProtocolType.Tcp);
+ remember.Add(s);
+ Console.Error.Write("try to poll handle : {0} :",s.Handle);
+ s.Poll(1, SelectMode.SelectRead);
+ Console.Error.WriteLine(" ok");
+ }
+
+ Console.Error.WriteLine("--end--");
+ Console.ReadLine();
+ }
+
+Actual Results:
+(...)
+try to poll handle : 1214 : ok
+try to poll handle : 1215 : ok
+try to poll handle : 1216 :
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+ at (wrapper managed-to-native) System.Net.Sockets.Socket:Poll_internal
+(intptr,System.Net.Sockets.SelectMode,int,int&)
+
+works fine with MS.NET
+
+tested with :
+uname -a = Linux ... 2.6.17.4 ... i686 GNU/Linux
+mono -V = Mono JIT compiler version 1.1.17.1, ...
More information about the mono-bugs
mailing list