Bugzilla – Bug 321774
SIGSEGV while creating process
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by brian@fluggo.com 2006-08-11 19:49:33 MST ---- Description of Problem: Mono doesn't seem to either like the input or output of echo when run this way. Two important ingredients to this program: (1) standard out is redirected, and (2) the string argument to /bin/echo is unquoted. Steps to reproduce the problem: using System; using System.Diagnostics; namespace Test { class TestClass { static void Main() { for( int i = 0; i < 3; i++ ) { ProcessStartInfo info = new ProcessStartInfo( "/bin/echo", "I'm hen-er-y the 8th I am...8" ); info.UseShellExecute = false; info.RedirectStandardOutput = true; Process process = Process.Start( info ); Console.WriteLine( process.StandardOutput.ReadLine() ); process.WaitForExit(); } } } } Actual Results: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Stacktrace: at (wrapper managed-to-native) System.Diagnostics.Process.CreateProcess_internal (System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&) <0x00004> at (wrapper managed-to-native) System.Diagnostics.Process.CreateProcess_internal (System.Diagnostics.ProcessStartInfo,intptr,intptr,intptr,System.Diagnostics.Process/ProcInfo&) <0xffffffff> at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) <0x00395> at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) <0x0007e> at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo) <0x00032> at Test.TestClass.Main () <0x00061> at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff> Native stacktrace: mono(mono_handle_native_sigsegv+0xf5) [0x815d785] mono [0x8147953] [0xffffe440] mono [0x816881c] [0x40a94522] [0x40a93dae] [0x40a92e4f] [0x40a92bbb] [0x40a9289a] [0x40a927be] mono(mono_runtime_exec_main+0x60) [0x80d67c0] mono(mono_runtime_run_main+0x21f) [0x80d6b2f] mono(mono_main+0xf17) [0x805d297] mono [0x805bece] /lib/tls/libc.so.6(__libc_start_main+0xd0) [0x4011cea0] mono(dl_iterate_phdr+0x199) [0x805be11] Expected Results: No SIGSEGV, to be sure. Whether the program would have the output expected is debatable. How often does this happen? If the standard output is not redirected, or the echo argument is properly quoted, the problem disappears. The problem is also not evident on the first two iterations of the loop-- neither produces a SIGSEGV. Additional Information: ---- Additional Comments From robertj@gmx.net 2006-08-21 13:46:26 MST ---- Tracked here: https://bugzilla.novell.com/show_bug.cgi?id=MONO79117 *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO79117 *** Unknown bug field "cf_version_details" encountered while moving bug <cf_version_details>1.1.16.1 tarball</cf_version_details> Unknown operating system SUSE 9.2. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"