Bug 9137 - jit crash with xsp
Summary: jit crash with xsp
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-12-27 05:08 UTC by olivier dufour
Modified: 2013-01-02 08:53 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description olivier dufour 2012-12-27 05:08:42 UTC

I am on ubuntu 12.12 with mono package and a mono parallele environment.
I have install serviceStack.Examples.

>uname -a 
Linux dufoli-1005PE 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux

When Is use Xsp with old version it work but when I switch to mono parallele env dated of 26 December :
Mono JIT compiler version 3.0.3 (master/717a34f mercredi 26 décembre 2012, 21:18:11 (UTC+0100))
Copyright (C) 2002-2012 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)

here is the crash:
xsp --port 8081
* Assertion at threads.c:767, condition `((char*)&internal->unused2 - (char*)internal) == mono_defaults.internal_thread_class->fields [mono_defaults.internal_thread_class->field.count - 1].offset' not met


Native stacktrace:

	/home/dufoli/opt/mono-2.10/bin/mono() [0x80eed33]
	/lib/i386-linux-gnu/libc.so.6(gsignal+0x4f) [0xb75ae1df]
	/lib/i386-linux-gnu/libc.so.6(abort+0x175) [0xb75b1825]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x8251011]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x82510a3]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x81bc401]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x81daa58]
	/home/dufoli/opt/mono-2.10/bin/mono(mono_runtime_init+0x17a) [0x81d1f0a]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x80641ff]
	/home/dufoli/opt/mono-2.10/bin/mono(mono_main+0x31f) [0x80c4dcf]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x805c062]
	/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb75994d3]
	/home/dufoli/opt/mono-2.10/bin/mono() [0x805c215]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.

Aborted (core dumped)

it seems linked to commit:
Comment 1 Zoltan Varga 2013-01-02 08:48:32 UTC
This means that somehow your 3.0 mono is using a 2.10 mscorlib.dll, or vice versa.
Comment 2 Zoltan Varga 2013-01-02 08:53:27 UTC
The assertion is now fixed in master, a normal error message is now displayed for these cases.