Bugzilla – Bug 317890
can't run more than about 4000 processes
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by lupus@ximian.com 2005-05-05 12:59:56 MST ---- The following test fails at about 4080 loops. Note that this is cumulative: if you run first with mono redirect-stdout.exe 2080 and then mono redirect-stdout.exe 2080 it will fail again. The error is: Unhandled Exception: System.ComponentModel.Win32Exception: Some sort of w32 error occurred: 14 in <0x003d8> System.Diagnostics.Process:Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) in <0x00013> System.Diagnostics.Process:Start () Subsequent runs will give a SEGV in unmanaged code after a few warnings: ** (redirect-stdout.exe:21278): WARNING **: process_set_current: error creating process handle ** (redirect-stdout.exe:21278): WARNING **: CreateProcess: error creating process handle Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0x00000> <unknown method> in (wrapper managed-to-native) System.Diagnostics.Process:Start_internal (string,string,string,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&) To be able to restart the process, ~/.wapi is removed. using System.Diagnostics; using System; class T { static void Main (string[] args) { int loops = 5000; if (args.Length > 0) loops = int.Parse (args [0]); for (int i = 0; i < loops; ++i) run (); } static void run () { Process proc = new Process (); proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.FileName = "/bin/df"; proc.StartInfo.Arguments = "-TPl --block-size=1"; proc.Start (); string output = proc.StandardOutput.ReadToEnd (); proc.WaitForExit (); proc.Close (); //Console.Write (output); } } ---- Additional Comments From dick@ximian.com 2005-05-05 16:59:18 MST ---- As discussed online, this is a dup of the resource starvation issue. *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO74696 *** Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"