[ubuntu-mono] [Bug 424239] [NEW] Mono crashes when creating too many threads or running too many processes

JODE joakim at nsense.net
Fri Sep 4 10:54:08 BST 2009


Public bug reported:

Binary package hint: mono

I've seen this bug pop up in different versions every now and then. I've tried
code that uses threads to launch processes and all kinds of work arounds. The
problem is simple however.

Running on latest jaunty ubuntu with mono version: 2.0.1 (tried 2.4.2.3
as well)

The following code fails after 255 iterations:

using System;
class Program {
static void Main(string[] args)
        {

            for (int i = 0; i < 4096; i++)
            {
                Console.WriteLine("Starting: " + i.ToString());
                System.Diagnostics.Process.Start("echo \"hello mono\";");
                System.GC.Collect();
                System.GC.WaitForPendingFinalizers();
                System.Threading.Thread.Sleep(10);
            }
        }

}

In addition there is a problem in the way the error is raised. As a WARNING 
from the mono runtime - Createprocess: error creating process handle. This is
not seen by the application so the application assumes everything is fine. 

I've tried different ways with greater sleeps (for gc to have time to come
collect). But never been able to go above 300 processes. And at the same time
being unable to notice the error (pretty critical).

** Affects: mono (Ubuntu)
     Importance: Undecided
         Status: New

-- 
 Mono crashes when creating too many threads or running too many processes
https://bugs.launchpad.net/bugs/424239
You received this bug notification because you are a member of MOTU Mono
Team, which is subscribed to mono in ubuntu.



More information about the Ubuntu-mono mailing list