[Mono-dev] CreateProcess: error creating process handle

Rolf Bjarne Kvinge rolf at xamarin.com
Mon Jan 9 12:46:35 UTC 2012


Hi,

On Sun, Jan 8, 2012 at 8:30 PM, Jake1305 <jake1305 at gmail.com> wrote:

> Hi there,
>
> Recently I've been developing an application in C# and I am using Mono to
> run it on Linux, I'm specifically testing on Debian 6.
>
> After a 2-8 hours the application keeps showing a warning, which
> is CreateProcess: error creating process handle. This warning has been
> posted on this mailing list before, specifically
> http://mono.1490590.n4.nabble.com/Mono-CreateProcess-error-td1525870.html and
> in several other places I believe.
>
> My application creates at least 10 processes per minute which run for
> under a second/half a second normally and I also called
> process.WaitForExit() and process.Dispose() to try help circumvent the
> error as suggested in other emails and as I've seen on Google,
> but unfortunately it has not helped.
>
> I was wondering if anybody has any potential solutions, It happens on both
> 2.10.2 and 2.10.6.
>
> I saw this test case here:
>
> http://lists.ximian.com/pipermail/mono-bugs/2009-September/092261.html
>
> System.Diagnostics.Process[] processes = new System.Diagnostics.Process[4096];
>
> for (int i = 0; i < 4096; i++)
> {
>  Console.WriteLine("Starting: " + i.ToString());
>  processes[i] = new System.Diagnostics.Process();
>  processes[i].StartInfo.FileName ="echo";
>  processes[i].StartInfo.Arguments = "\"hello mono \";";
>  processes[i].Start();
>
> System.GC.Collect();
> System.GC.WaitForPendingFinalizers();
> System.Threading.Thread.Sleep(10);
> }
>
>
This test case isn't disposing the processes. If I add this at the end
(after the sleep):

processes[i].Dispose ();
processes[i] = null;

I can successfully run the test case to completion.

Rolf


>
> Sorry for re-asking this question but I have not found a working solution
> yet.
>
> Thanks!
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120109/b2ad6d72/attachment.html 


More information about the Mono-devel-list mailing list