[Mono-dev] crashes in glib hangs (not exits) program

D Bera dbera.web at gmail.com
Tue Apr 22 06:45:27 EDT 2008


> > > "doing nothing". Hope I am clear this time. Looking at the stack trace
> > > I _think_ its just some bug in mono's after-crash-stacktrace-printer
> > > which is causing the problem. Mono's behaviour (and yours too) is
> > > absolutely right otherwise.
> >
> > It's most likely the g_spawn* that gets the stack trace from gdb. You
> > may try to comment out the offending code in mini/mini-exceptions.c.

Little progress: I mentioned this on the bug page but I will do it
here too. Setting the SIGABRT handler to SIG_DFL seems to work. I
noticed that after the crash
- mono starts gdb to get information about the threads et al
- abort()
- this somehow brought the control back to mono, which it shouldnt -
the stacktrace read like
  (mono)
  (libc)
  (libc)
  (gsignal)
  (abort)
...
  This could be a red-herring but it prompted me to try after removing
mono's sigabrt handler. Overriding mono's sigabrt handler by the
default one does not print the nice mono stacktrace but crashes
exactly the way it would do on a native segfault.

Overriding SIGABRT seems like a working workaround. Some kind of
flag/option to control this behaviour would be nice though. What would
be best is to get both the mono stacktrace and successfully abort
after that :-).

- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user


More information about the Mono-devel-list mailing list