Bug 410740 - ProcessWrapper leaks wapi handles
Summary: ProcessWrapper leaks wapi handles
Status: RESOLVED FIXED
Alias: None
Product: MonoDevelop
Classification: Mono
Component: general (show other bugs)
Version: SVN
Hardware: All Linux
: P5 - None : Major
Target Milestone: ---
Assignee: MD Bugs
QA Contact: MD Bugs
URL:
Whiteboard:
Keywords: Code
Depends on:
Blocks:
 
Reported: 2008-07-21 03:03 UTC by Mitchell Wheeler
Modified: 2008-07-23 03:43 UTC (History)
0 users

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


Attachments
Test case (3.74 KB, text/x-csharp)
2008-07-21 03:03 UTC, Mitchell Wheeler
Details
Segfault (wapi leak) while compiling C# project (after just having run the test case). (35.96 KB, application/octet-stream)
2008-07-21 03:05 UTC, Mitchell Wheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mitchell Wheeler 2008-07-21 03:03:09 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).
Comment 1 Mitchell Wheeler 2008-07-21 03:05:13 UTC
Created attachment 228954 [details]
Segfault (wapi leak) while compiling C# project (after just having run the test case).
Comment 2 Michael Hutchinson 2008-07-23 03:43:27 UTC
This is a manifestation of Mono bug 410743.

Worked around it in r108526.
Comment 3 Michael Hutchinson 2008-07-23 03:43:47 UTC
Marking fixed.