Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79286 --- shadow/79286 2006-09-05 16:53:57.000000000 -0400 +++ shadow/79286.tmp.32078 2006-09-05 16:53:57.000000000 -0400 @@ -0,0 +1,91 @@ +Bug#: 79286 +Product: Mono: Runtime +Version: 1.1 +OS: SUSE 9.2 +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: misc +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Still leaking WAPI process handles + +Description of Problem: +Every now and then when executing an external process, a process handle is +leaked in the WAPI table. (I don't know the details; just the symptoms.) + +Steps to reproduce the problem: + +1. Compile and run the following program (the external program executed is +not important): +using System; +using System.Diagnostics; + +namespace Test { + class Test { + static void Main() { + for( ;; ) { + try { + ProcessStartInfo info = new ProcessStartInfo( +"/sbin/ifconfig" ); + info.UseShellExecute = false; + info.RedirectStandardOutput = true; + info.RedirectStandardError = true; + + Process process = Process.Start( info ); + + Console.WriteLine( process.StandardOutput.ReadLine() ); + Console.WriteLine( process.StandardError.ReadToEnd() ); + + process.WaitForExit(); + process.Dispose(); + } + catch( Exception ex ) { + Console.WriteLine( ex ); + } + } + } + } +} + +2. From another command prompt, run "mono --wapi=hps" occasionally. + +Actual Results: +Stray entries begin to appear while the program is running, like these: +----------- + 29 ( 1) [Process] 4 Sg ([ /sbin/ifconfig] pid: 683 exit: 0) + 6d ( 1) [Process] 4 Sg ([ /sbin/ifconfig] pid: 5601 exit: 0) + 6f ( 1) [Process] 4 Sg ([ /sbin/ifconfig] pid: 13687 exit: 0) + 76 ( 1) [Process] 4 Sg ([ /sbin/ifconfig] pid: 29340 exit: 0) +12c ( 1) [Process] 4 Sg ([ /sbin/ifconfig] pid: 24527 exit: 0) +----------- + +These entries appear randomly throughout the handle space. + + +Expected Results: +Since this program is single-threaded and properly disposes of the Process +object, at most one external process handle should appear in the WAPI table +at any given time. + +How often does this happen? +Every time the program runs long enough. On my machine, handles are leaked +at intervals of less than one minute. + +Additional Information: +This appears in SVN HEAD (r64487). + +It doesn't seem to matter whether the program is multi-threaded or whether +Dispose() is called on the Process object. In these scenarios, more handles +will appear in the WAPI table at the same time, but most of these will +disappear appropriately between executions of "mono --wapi=hps". + +It also doesn't appear to matter whether one process is run right after +another. I think this could happen for any external process. The above +program just makes the occurence happen more quickly. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
