Bug 317890 (MONO74835) - can't run more than about 4000 processes
Summary: can't run more than about 4000 processes
Status: RESOLVED MOVED
Alias: MONO74835
Product: Mono: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Dick Porter
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 19:59 UTC by Paolo Molaro
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:15:53 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"