Mono crash when executing an extenal command

Tom McLaughlin tmclaugh at sdf.lonestar.org
Mon Feb 28 06:39:35 GMT 2005


On Mon, 2005-02-28 at 00:48 -0500, Tom McLaughlin wrote:
> Hi, the backtrace listed at the end was collected on a -STABLE machine
> (20050219) using Mono 1.1.4[1].  Below is the C# code that caused it.
> It should just list the contents of the current directory.  It does list
> them but crashes afterwards.
> 
<snip>

Here's also a second backtrace that appears slightly different.  This C#
better resembled that from the program where I first found the crash.
(You guys are going to love Mono and me after a while...  Or the
opposite of that. ;)  Thanks.

Tom



ls-exec_ProcessStartInfo.cs
---
using System.Diagnostics;

class T
{
    static void Main()
    {
        ProcessStartInfo pi = new ProcessStartInfo ();
        pi.FileName = "ls";
        pi.RedirectStandardOutput = true;
        pi.UseShellExecute = false;
        pi.Arguments = "-al";
        Process.Start (pi);
    }
}
---


[tom at europe-monodev mono]$ mcs ls-exec_ProcessStartInfo.cs
[tom at europe-monodev mono]$ gdb /usr/local/bin/mono mono.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `mono'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libgthread-2.0.so.400...done.
Loaded symbols for /usr/local/lib/libgthread-2.0.so.400
Reading symbols from /usr/local/lib/libgmodule-2.0.so.400...done.
Loaded symbols for /usr/local/lib/libgmodule-2.0.so.400
Reading symbols from /usr/local/lib/libglib-2.0.so.400...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.400
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libm.so.3...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/lib/libintl.so.6...done.
Loaded symbols for /usr/local/lib/libintl.so.6
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x2836a3cb in kse_thr_interrupt () at kse_thr_interrupt.S:2
2       kse_thr_interrupt.S: No such file or directory.
        in kse_thr_interrupt.S
(gdb) bt full
#0  0x2836a3cb in kse_thr_interrupt () at kse_thr_interrupt.S:2
No locals.
#1  0x2835adde in _thr_sig_add (pthread=0x81b0000, sig=6, info=0x0)
    at /usr/src/lib/libpthread/thread/thr_sig.c:974
        siginfo = {si_signo = 136715168, si_errno = 16777224,
  si_code = 674635894, si_pid = 674682044, si_uid = 136735360,
  si_status = -1077943988, si_addr = 0x2835c8c7, si_value = {
    sigval_int = 672944208, sigval_ptr = 0x281c5050}, si_band =
135962676,
  __spare__ = {-1077943988, 674613305, 1, 136735360, 672944208,
672895960,
    674673066}}
        kmbx = (struct kse_mailbox *) 0x0
        curthread = (struct pthread *) 0x1
        restart = 0
        suppress_handler = 0
        fromproc = 0
        sigfunc = (__sighandler_t *) 0
#2  0x2835b1f5 in _thr_sig_send (pthread=0x81b0000, sig=6)
    at /usr/src/lib/libpthread/thread/thr_sig.c:1106
        curthread = (struct pthread *) 0x81b0000
        kmbx = (struct kse_mailbox *) 0x0
#3  0x2835528d in _pthread_kill (pthread=0x81b0000, sig=6)
    at /usr/src/lib/libpthread/thread/thr_kill.c:60
        curthread = (struct pthread *) 0x81b0000
        ret = 0
#4  0x28354c5c in _raise (sig=1)
    at /usr/src/lib/libpthread/thread/thr_raise.c:46
        ret = -1077943808
#5  0x28425b67 in abort () at /usr/src/lib/libc/stdlib/abort.c:69
        act = {__sigaction_u = {__sa_handler = 0x1, __sa_sigaction =
0x1},
  sa_flags = 672925696, sa_mask = {__bits = {4294967263, 4294967295,
      4294967295, 4294967295}}}
#6  0x281f90af in g_logv () from /usr/local/lib/libglib-2.0.so.400
No symbol table info available.
#7  0x281f914d in g_log () from /usr/local/lib/libglib-2.0.so.400
No symbol table info available.
#8  0x080e8b2a in WaitForSingleObjectEx (handle=0x1e4f, timeout=500,
    alertable=0) at wait.c:70
        ret = 135133339
        waited = 1
        abstime = {tv_sec = 12260, tv_nsec = 12348}
        thr_ret = 382
        apc_pending = 0
        current_thread = 0x1e42
        __PRETTY_FUNCTION__ = "WaitForSingleObjectEx"
#9  0x080df8d6 in CreateProcess (appname=0x8, cmdline=0x81e8fb4,
    process_attrs=0x0, thread_attrs=0x0, inherit_handles=1,
create_flags=1024,
    new_environ=0x0, cwd=0x0, startup=0xbfbfe7f8,
process_info=0xbfbfe7e8)
    at processes.c:437
        cmd = (gchar *) 0x82b8a10 "'/bin/ls'"
        prog = (gchar *) 0x82b8a90 "/bin/ls"
        full_prog = (gchar *) 0x82b8ac0 "'/bin/ls' -al"
        args = (gchar *) 0x82b8a80 "-al"
        args_after_prog = (gchar *) 0x82b8a80 "-al"
        dir = (gchar *) 0x82b7840 "/home/tom/projects/mono"
        env = 12348
        stored_dir = 11244
        stored_prog = 12260
        i = 8
        ret = 1
        stdin_handle = 0xbfbfe7e8
        stdout_handle = 0x8
        stderr_handle = 0x1
        pid = 26548
        tid = 0
        process_handle = 0x1e4f
        thread_handle = 0x1e50
        process_handle_data = (struct _WapiHandle_process *) 0xbfbfe790
#10 0x080b764c in ves_icall_System_Diagnostics_Process_Start_internal (
    appname=0x81e8fc0, cmd=0x81e8fa8, dirname=0x81e3e50,
stdin_handle=0x17e,
    stdout_handle=0x17e, stderr_handle=0x17e, process_info=0xbfbfe910)
    at process.c:847
        ret = 8
        dir = (gunichar2 *) 0x1
        startinfo = {cb = 68, lpReserved = 0x0, lpDesktop = 0x0,
  lpTitle = 0x0, dwX = 0, dwY = 0, dwXSize = 0, dwYSize = 0,
  dwXCountChars = 0, dwYCountChars = 0, dwFillAttribute = 0,
  dwFlags = STARTF_USESTDHANDLES, wShowWindow = 0, cbReserved2 = 0,
  lpReserved2 = 0x0, hStdInput = 0x0, hStdOutput = 0x8, hStdError = 0x2}
        procinfo = {hProcess = 0x1e4f, hThread = 0x1e50, dwProcessId =
26548,
  dwThreadId = 0}
        shell_path = (gunichar2 *) 0x82b77c0
        env_vars = (gchar *) 0x0
        free_shell_path = 382
        newcmd = (gchar *) 0xbfbfe910 ""
        tmp = (gchar *) 0x81e7f30 "hn\033\b"
#11 0x2863a336 in ?? ()
No symbol table info available.
#12 0x081e8fc0 in ?? ()
No symbol table info available.
#13 0x081e8fa8 in ?? ()
No symbol table info available.
#14 0x081e3e50 in ?? ()
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
#16 0x00000008 in ?? ()
No symbol table info available.
#17 0x00000002 in ?? ()
No symbol table info available.
#18 0xbfbfe910 in ?? ()
No symbol table info available.
#19 0x081a7200 in ?? ()
No symbol table info available.
#20 0x081a71e8 in ?? ()
No symbol table info available.
#21 0x08299f40 in ?? ()
No symbol table info available.
#22 0x081e8fc0 in ?? ()
No symbol table info available.
#23 0x08272fa0 in ?? ()
No symbol table info available.
#24 0x081e7f30 in ?? ()
No symbol table info available.
#25 0xbfbfe8a4 in ?? ()
No symbol table info available.
#26 0x2863a304 in ?? ()
No symbol table info available.
#27 0xbfbfe93c in ?? ()
No symbol table info available.
#28 0x286397c5 in ?? ()
No symbol table info available.
#29 0x081e8fc0 in ?? ()
No symbol table info available.
#30 0x081e8fa8 in ?? ()
No symbol table info available.
#31 0x081e3e50 in ?? ()
No symbol table info available.
#32 0x00000000 in ?? ()
No symbol table info available.
#33 0x00000008 in ?? ()
No symbol table info available.
#34 0x00000002 in ?? ()
No symbol table info available.
#35 0xbfbfe910 in ?? ()
No symbol table info available.
#36 0xbfbfe8e8 in ?? ()
No symbol table info available.
#37 0x08070f7f in x86_magic_trampoline (eax=136220608, ecx=136220584,
    edx=136199760, esi=0, edi=8, ebx=2, code=0x81e7f30 "hn\033\b",
    m=0xbfbfe8e8) at tramp-x86.c:123
        reg = 8 '\b'
        disp = 136220608
        o = 0x8 <Address 0x8 out of bounds>
        addr = 0x8272fa0
        __PRETTY_FUNCTION__ = "x86_magic_trampoline"
Previous frame inner to this frame (corrupt stack?)
(gdb)


-- 

BSD# Project - Porting Mono to FreeBSD
http://forge.novell.com/modules/xfmod/project/?bsd-sharp



More information about the freebsd-threads mailing list