https://bugzilla.novell.com/show_bug.cgi?id=707624
https://bugzilla.novell.com/show_bug.cgi?id=707624#c0 Summary: Crash the process start on busy machine Classification: Mono Product: Mono: Runtime Version: 2.10.x Platform: x86-64 OS/Version: RHEL 5 Status: NEW Severity: Normal Priority: P5 - None Component: misc AssignedTo: mono-bugs@lists.ximian.com ReportedBy: y...@serdyuk.botik.ru QAContact: mono-bugs@lists.ximian.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 The test code is ProcessTest (in fact, A.cs ) from http://lists.ximian.com/pipermail/mono-bugs/2009-January/084380.html On empty machine the test code works good: >$ mono A.exe >started, waiting for handles >True To get the crash it is needed to run heavy application on all cores of the machine and then run the test. Then we have: > $ mono A.exe Unhandled Exception: System.InvalidOperationException: Standard error has not been redirected or process has not been start at System.Diagnostics.Process.BeginErrorReadLine () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:BeginErrorReadLine () at A.Main () [0x00000] in <filename unknown>:0 Reproducible: Always Steps to Reproduce: 1. Compile the code using System; using System.Diagnostics; using System.Threading; public class A { // Plain copy paste from test trunk/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs:TestEventRaising public static void Main() { EventWaitHandle errorClosed = new ManualResetEvent(false); EventWaitHandle outClosed = new ManualResetEvent(false); EventWaitHandle exited = new ManualResetEvent(false); Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.RedirectStandardInput = false; p.OutputDataReceived += (object sender, DataReceivedEventArgs e) => { if (e.Data == null) { outClosed.Set(); } }; p.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => { if (e.Data == null) { errorClosed.Set(); } }; p.Exited += (object sender, EventArgs e) => { exited.Set (); }; p.EnableRaisingEvents = true; //if (RunningOnUnix){ p.StartInfo.FileName = "/bin/ls"; p.StartInfo.Arguments = "/"; /*} else { p.StartInfo.FileName = "help"; p.StartInfo.Arguments = ""; }*/ p.Start(); p.BeginErrorReadLine(); p.BeginOutputReadLine(); Console.WriteLine("started, waiting for handles"); bool r = WaitHandle.WaitAll(new WaitHandle[] { errorClosed, outClosed, exited }, 10000, false); //Assert.AreEqual (true, r, "Null Argument Events Raised"); System.Console.WriteLine(r); } } 2. Run a heavy application which uses all cores on the machine. 3. Run the test code. Actual Results: > $ mono A.exe Unhandled Exception: System.InvalidOperationException: Standard error has not been redirected or process has not been start at System.Diagnostics.Process.BeginErrorReadLine () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:BeginErrorReadLine () at A.Main () [0x00000] in <filename unknown>:0 Expected Results: >$ mono A.exe >started, waiting for handles >True > cat /proc/cpuinfo processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5472 @ 3.00GHz stepping : 6 cpu MHz : 3000.352 cache size : 6144 KB $ uname -a Linux node-63-01 2.6.32-hpc-skif-alt0.M41.1 #1 SMP Tue Mar 29 10:51:56 MSD 2011 x86_64 GNU/Linux $ mono -V Mono JIT compiler version 2.10.2 (tarball Thu Jul 21 16:41:14 MSD 2011) Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs