[Mono-list] Mono crashed in UnixSignal.WaitAny

Yves Goergen nospam.list at unclassified.de
Thu Mar 29 18:07:50 UTC 2012


Hi there,

I've reinstalled my ALIX box now and tried running my .NET application
again. This time, it doesn't even do anything useful because Mono
crashes before. My application uses Mono.Unix.UnixSignal.WaitAny to sit
there as a background daemon and wait for somebody to terminate it
gracefully, while the work is done in some background threads. But see
this stack trace that is written to the console:

> Stacktrace:
> 
>   at (wrapper managed-to-native) Mono.Unix.UnixSignal.WaitAny (intptr[],int,int) <0xffffffff>
>   at Mono.Unix.UnixSignal.WaitAny (Mono.Unix.UnixSignal[],int) <0x00123>
>   at LogState.Program.Main (string[]) <0x0176f>
>   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
> 
> Native stacktrace:
> 
> 	mono() [0x80e126c]
> 	mono() [0x812046c]
> 	mono() [0x805fe7d]
> 	[0x54f40c]
> 	/usr/lib/libMonoPosixHelper.so(Mono_Unix_UnixSignal_WaitAny+0x206) [0x2b8136]
> 	[0xc41200]
> 	[0xc410d4]
> 	[0x311840]
> 	[0x311d07]
> 	mono() [0x8064afc]
> 
> Debug info from gdb:
> 
> 
> =================================================================
> 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.
> =================================================================

It suggests that there is a bug in Mono which is why I am reporting it
here and asking for advice. Here's my Mono version:

> root at alix:/usr/src# mono -V
> Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)
> Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
>         TLS:           __thread
>         SIGSEGV:       altstack
>         Notifications: epoll
>         Architecture:  x86
>         Disabled:      none
>         Misc:          softdebug
>         LLVM:          supported, not enabled.
>         GC:            Included Boehm (with typed GC and Parallel Mark)

I've also tried running it with "mono --gc=sgen" instead of "mono" after
I've found some indicating postings on the web. But that changed nothing.

My system is Ubuntu 11.10, here's the Linux version:

> root at alix:/usr/src# uname -a
> Linux alix 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i586 i586 i386 GNU/Linux

I have installed Mono through the regular apt-get with the following
packages:

> apt-get -y install binfmt-support libgdiplus libmono-posix4.0-cil libmono-system-core4.0-cil \
>   libmono-system-data4.0-cil libmono-system-drawing4.0-cil
libmono-system-net4.0-cil mono-runtime ttf-droid

A part of the "offending code" is this:

> if (Environment.OSVersion.Platform == PlatformID.Unix)
> {
> 	UnixSignal[] signals = new UnixSignal[] {
> 		new UnixSignal(Signum.SIGINT),
> 		new UnixSignal(Signum.SIGTERM)
> 	};
> 	UnixSignal.WaitAny(signals, -1);
> }

I'm working on a small test case to see if I can reproduce the bug
without all my application hanging on it. At least now it is 100%
reproducible.

This used to work before, but that was on the old installation (also
with Ubuntu 11.10) a few months ago. With much of the same code on my
side, especially the quoted lines.

If you need more information, please ask me.

-- 
Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de


More information about the Mono-list mailing list