[Mono-bugs] [Bug 616463] New: SIGSEGV in common_call_trampoline (with test case)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jun 22 17:23:16 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=616463
http://bugzilla.novell.com/show_bug.cgi?id=616463#c0
Summary: SIGSEGV in common_call_trampoline (with test case)
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: i686
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: ohh at scisoft.dk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; da; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729; .NET4.0E)
I get a runtime crash (SIGSEGV) every time in
common_call_trampoline/mono_magic_trampoline. It appears to have something to
do with calling an overridden method in a generic class.
Easy to reproduce with the test case.
If I compile with gmcs from 2.6.4 it works with both mono from 2.6.4 and from
trunk.
If I compile with gmcs from trunk it crashes with both mono from 2.6.4 and from
trunk. This makes me conclude that the error is in the compiler.
Reproducible: Always
Steps to Reproduce:
-bash-4.0$ cat test.cs
using System;
public class Test
{
public static void Main ()
{
var vtib = new VTI_C<int> ();
var result = vtib.GRAF<int> ();
if (result) {
Console.WriteLine ("It works");
}
}
}
public abstract class VTIB
{
public abstract bool GRAF<K>();
}
public class VTI<T> : VTIB
{
public override bool GRAF<K>() {
return true;
}
}
public class VTI_C<T> : VTI<T>
{
}
-bash-4.0$ gmcs test.cs && mono test.exe
Actual Results:
-bash-4.0$ gmcs test.cs && mono test.exe
Stacktrace:
at Test.Main () <0xffffffff>
at Test.Main () <0x00027>
at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0x0002a>
Native stacktrace:
mono [0x80d2639]
mono [0x811109b]
[0xb7f3e440]
mono [0x80d6539]
mono [0x80d6c5a]
[0xb7b5e066]
[0xb60c6203]
mono [0x80601d8]
mono(mono_runtime_invoke+0x3e) [0x812a01e]
mono(mono_runtime_exec_main+0xd6) [0x812d106]
mono(mono_main+0x1911) [0x80b01b1]
mono [0x8056bf5]
/lib/i686/nosegneg/libc.so.6(__libc_start_main+0xe6) [0xb7d85a86]
mono [0x8056b31]
Debug info from gdb:
Mono support loaded.
[Thread debugging using libthread_db enabled]
[New Thread 0xb5d0fb70 (LWP 10964)]
[New Thread 0xb5d40b70 (LWP 10963)]
[New Thread 0xb6b5bb70 (LWP 10962)]
[New Thread 0xb735cb70 (LWP 10961)]
[New Thread 0xb7b5db70 (LWP 10960)]
0xb7f3e402 in __kernel_vsyscall ()
6 Thread 0xb7b5db70 (LWP 10960) 0xb7f3e402 in __kernel_vsyscall ()
5 Thread 0xb735cb70 (LWP 10961) 0xb7f3e402 in __kernel_vsyscall ()
4 Thread 0xb6b5bb70 (LWP 10962) 0xb7f3e402 in __kernel_vsyscall ()
3 Thread 0xb5d40b70 (LWP 10963) 0xb7f3e402 in __kernel_vsyscall ()
2 Thread 0xb5d0fb70 (LWP 10964) 0xb7f3e402 in __kernel_vsyscall ()
* 1 Thread 0xb7d6e6f0 (LWP 10959) 0xb7f3e402 in __kernel_vsyscall ()
Thread 6 (Thread 0xb7b5db70 (LWP 10960)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7eedfe5 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/i686/nosegneg/libpthread.so.0
#2 0x08204652 in GC_wait_marker () at pthread_support.c:1785
#3 0x082065b6 in GC_help_marker (my_mark_no=2) at mark.c:1116
#4 0x0820356e in GC_mark_thread (id=0x0) at pthread_support.c:548
#5 0xb7ee990c in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#6 0xb7e4f56e in clone () from /lib/i686/nosegneg/libc.so.6
Thread 5 (Thread 0xb735cb70 (LWP 10961)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7eedfe5 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/i686/nosegneg/libpthread.so.0
#2 0x08204652 in GC_wait_marker () at pthread_support.c:1785
#3 0x082065b6 in GC_help_marker (my_mark_no=2) at mark.c:1116
#4 0x0820356e in GC_mark_thread (id=0x1) at pthread_support.c:548
#5 0xb7ee990c in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#6 0xb7e4f56e in clone () from /lib/i686/nosegneg/libc.so.6
Thread 4 (Thread 0xb6b5bb70 (LWP 10962)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7eedfe5 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/i686/nosegneg/libpthread.so.0
#2 0x08204652 in GC_wait_marker () at pthread_support.c:1785
#3 0x082065b6 in GC_help_marker (my_mark_no=2) at mark.c:1116
#4 0x0820356e in GC_mark_thread (id=0x2) at pthread_support.c:548
#5 0xb7ee990c in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#6 0xb7e4f56e in clone () from /lib/i686/nosegneg/libc.so.6
Thread 3 (Thread 0xb5d40b70 (LWP 10963)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7ef1886 in nanosleep () from /lib/i686/nosegneg/libpthread.so.0
#2 0x081d0358 in collection_thread (unused=0x0) at collection.c:34
#3 0xb7ee990c in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#4 0xb7e4f56e in clone () from /lib/i686/nosegneg/libc.so.6
Thread 2 (Thread 0xb5d0fb70 (LWP 10964)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7ef02d5 in sem_wait@@GLIBC_2.1 () from
/lib/i686/nosegneg/libpthread.so.0
#2 0x081eb9d8 in mono_sem_wait (sem=0x83076a4, alertable=0) at
mono-semaphore.c:102
#3 0x081202f0 in finalizer_thread (unused=0x0) at gc.c:1048
#4 0x0816bf35 in start_wrapper (data=0x8332208) at threads.c:747
#5 0x081e77cf in thread_start_routine (args=0x835f1e4) at wthreads.c:285
#6 0x082042ef in GC_start_routine (arg=0x4ffe0) at pthread_support.c:1390
#7 0xb7ee990c in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#8 0xb7e4f56e in clone () from /lib/i686/nosegneg/libc.so.6
Thread 1 (Thread 0xb7d6e6f0 (LWP 10959)):
#0 0xb7f3e402 in __kernel_vsyscall ()
#1 0xb7ef106b in read () from /lib/i686/nosegneg/libpthread.so.0
#2 0x080d27e5 in mono_handle_native_sigsegv (signal=11, ctx=0xb6358d0c) at
mini-exceptions.c:1915
#3 0x0811109b in mono_arch_handle_altstack_exception (sigctx=0xb6358d0c,
fault_addr=0x5c6, stack_ovf=0) at exceptions-x86.c:1062
#4 <signal handler called>
#5 common_call_trampoline (regs=<value optimized out>, code=0xb60c61a7
"\203\304\20\205\300t\20\203\354\fh\340\37\5", arg=<value optimized out>,
tramp=
0x0, vt=0x8328c44, vtable_slot=0x8328c78, need_rgctx_tramp=0) at
mini-trampolines.c:402
#6 0x080d6c5a in mono_magic_trampoline (regs=0xbfb1b748, code=0xb60c61a7
"\203\304\20\205\300t\20\203\354\fh\340\37\5", arg=0xfffffffe, tramp=0x0)
at mini-trampolines.c:611
#7 0xb7b5e066 in ?? ()
#8 0xbfb1b748 in ?? ()
#9 0xb60c61a7 in ?? ()
#10 0xfffffffe in ?? ()
#11 0x00000000 in ?? ()
=================================================================
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.
=================================================================
Aborted
Expected Results:
-bash-4.0$ gmcs test.cs && mono test.exe
It works
(This is what is happening on MS.NET and if comiled with gmcs from mono 2.6.4)
I am running Fedora 11 on a VPS running:
[root at dagobah Core]# uname -a
Linux dagobah.scisoft.dk 2.6.18.8-linode22 #1 SMP Tue Nov 10 16:12:12 UTC 2009
i686 i686 i386 GNU/Linux
-bash-4.0$ mono --version
Mono JIT compiler version 2.7 (/trunk/mono r159049 Thu Jun 17 07:23:59 UTC
2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: debugger softdebug
LLVM supported
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list