Bugzilla – Bug 410740
ProcessWrapper leaks wapi handles
Last modified: 2008-07-23 03:43:47 UTC
Created attachment 228953 [details] Test case After excessive and pro-longed use of ProcessWrapper, Mono eventually runs out of wapi handles causing "WARNING **: CreateProcess: error creating process handle" 'warnings', and in some cases segfaults. See attached for a test case (Main.cs), and segfault stack trace. The test case (with, or without the new Dispose functions) will leak wapi handles after approximately 30+ seconds (I guess this would depend on the speed at which the computer can create processes though), however after removing OnExited from the Exited event, wapi handles are no longer leaked (with or without the new Dispose).
Created attachment 228954 [details] Segfault (wapi leak) while compiling C# project (after just having run the test case).
This is a manifestation of Mono bug 410743. Worked around it in r108526.
Marking fixed.