Bug 29877 - Assertion at mini-generic-sharing.c - Works on .NET, Fails on Mono
Summary: Assertion at mini-generic-sharing.c - Works on .NET, Fails on Mono
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-08 09:17 UTC by Andrew Katz
Modified: 2017-08-28 15:02 UTC (History)
4 users (show)

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


Attachments
F# Script that always fail (3.60 KB, text/plain)
2015-07-03 07:02 UTC, Arnauld
Details

Description Andrew Katz 2015-05-08 09:17:14 UTC
Providing as much information as I have.  Unable to provide test code to simulate issue, but happy to provide further debug logs if someone provides instructions on how and what to gather.

Running Mono 4.0.1 on Linux trusty64


* Assertion at mini-generic-sharing.c:918, condition `oti' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at [Redacted]) <0x00033>
  at [Redacted] <0x00017>
  at [Redacted] <0x00067>
  at [Redacted] <0x0204b>
  at [Redacted] <0x00023>
  at System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2.MoveNext () <0x0017c>
  at System.Collections.Generic.List`1..ctor (System.Collections.Generic.IEnumerable`1<T>) <0x00203>
  at System.Linq.Enumerable.ToList<TSource> (System.Collections.Generic.IEnumerable`1<TSource>) <0x00064>
  at [Redacted] <0x00ea7>
  at [Redacted] <0x00437>
  at [Redacted] <0x002f7>
  at [Redacted] <0x0067b>
  at [Redacted] <0x000bb>
  at [Redacted] <0x00673>
  at [Redacted] <0x00227>
  at [Redacted] <0x002d6>
  at [Redacted] <0x0001f>
  at System.Threading.Timer/Scheduler.TimerCB (object) <0x00127>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x4b1d6c]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7fd3ed78b340]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7fd3ed3eccc9]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fd3ed3f00d8]
        mono() [0x629079]
        mono() [0x629287]
        mono() [0x6293d6]
        mono() [0x4bb9fd]
        mono() [0x4bdc5c]
        [0x4029aae6]

Debug info from gdb:

[New LWP 12449]
[New LWP 12442]
[New LWP 12441]
[New LWP 12438]
[New LWP 12437]
[New LWP 12436]
[New LWP 12435]
[New LWP 12434]
[New LWP 12433]
[New LWP 12432]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185     ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.
  Id   Target Id         Frame
  11   Thread 0x7fd3eae13700 (LWP 12432) "Finalizer" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  10   Thread 0x7fd3ea386700 (LWP 12433) "mono" 0x00007fd3ed4a182d in read () at ../sysdeps/unix/syscall-template.S:81
  9    Thread 0x7fd3ea155700 (LWP 12434) "Timer-Scheduler" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_co
nd_timedwait.S:238
  8    Thread 0x7fd3e9d9b700 (LWP 12435) "mono" 0x00007fd3ed4b0b13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
  7    Thread 0x7fd3e9d56700 (LWP 12436) "IO Threadpool w" sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:101
  6    Thread 0x7fd3e9d11700 (LWP 12437) "Threadpool moni" __clock_nanosleep (clock_id=1, flags=1, req=0x7fd3e9d10d20, rem=0xffffffffffffffff) at ../s
ysdeps/unix/sysv/linux/clock_nanosleep.c:49
  5    Thread 0x7fd3e9ccc700 (LWP 12438) "Threadpool work" 0x00007fd3ed78547a in __GI___pthread_mutex_lock (mutex=0x95bfe0) at ../nptl/pthread_mutex_l
ock.c:79
  4    Thread 0x7fd3c177b700 (LWP 12441) "Threadpool work" 0x00007fd3ed78aee9 in __libc_waitpid (pid=12451, stat_loc=0x7fd3c177848c, options=0) at ../
sysdeps/unix/sysv/linux/waitpid.c:40
  3    Thread 0x7fd3c0897700 (LWP 12442) "Threadpool work" __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
  2    Thread 0x7fd3c1e23700 (LWP 12449) "Threadpool work" __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
* 1    Thread 0x7fd3ee2bd7c0 (LWP 12431) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

Thread 11 (Thread 0x7fd3eae13700 (LWP 12432)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x000000000061e418 in mono_sem_wait ()
#2  0x00000000005a19be in ?? ()
#3  0x0000000000586cf8 in ?? ()
#4  0x0000000000623246 in ?? ()
#5  0x00007fd3ed783182 in start_thread (arg=0x7fd3eae13700) at pthread_create.c:312
#6  0x00007fd3ed4b047d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 10 (Thread 0x7fd3ea386700 (LWP 12433)):
#0  0x00007fd3ed4a182d in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000000040bef1a5 in ?? ()
#2  0x00007fd3dc001450 in ?? ()
#3  0x00007fd3ea385e00 in ?? ()
#4  0x00007fd3ec566ca0 in ?? ()
#5  0x0000000000000030 in ?? ()
#6  0x00007fd3ec565e08 in ?? ()
#7  0x00007fd3dc000bd0 in ?? ()
#8  0x00007fd3ea385e00 in ?? ()
#9  0x00007fd3ea385a70 in ?? ()
#10 0x00007fd3ea3859b0 in ?? ()
#11 0x0000000040bef074 in ?? ()
#12 0x00007fd3ec566cc0 in ?? ()
#13 0x0000000040bef018 in ?? ()
#14 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fd3ea155700 (LWP 12434)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00000000005fd5e7 in ?? ()
#2  0x00000000006102fc in ?? ()
#3  0x00000000005857ae in ?? ()
#4  0x0000000000586729 in ?? ()
#5  0x0000000040bfd66d in ?? ()
#6  0x0000000001bfd980 in ?? ()
#7  0x000000000000e2af in ?? ()
#8  0x000000000000e2af in ?? ()
#9  0x00007fd3ec6f5018 in ?? ()
#10 0x000000000000e2af in ?? ()
#11 0x00007fd3e0000bd0 in ?? ()
#12 0x00007fd300000002 in ?? ()
#13 0x00007fd3ea154970 in ?? ()
#14 0x00007fd3ea1548e0 in ?? ()
/build/buildd/gdb-7.7.1/gdb/dwarf2-frame.c:692: internal-error: Unknown CFI encountered.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
/build/buildd/gdb-7.7.1/gdb/dwarf2-frame.c:692: internal-error: Unknown CFI encountered.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]

=================================================================
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.
=================================================================
Comment 1 Zoltan Varga 2015-05-09 15:55:14 UTC
Does this happen randomly, or every time ?
Comment 2 Andrew Katz 2015-05-09 16:51:53 UTC
Yes, although the exception and details seem to be different on every run.

When I pull from 4.0.0 branch, commit 5a0b19f1a156e36ee244686fa936f95702f9f927 it does not exhibit the behavior.  When I pull and build from latest of branch, it crashes every run.
Comment 3 Zoltan Varga 2015-05-09 21:31:03 UTC
You mean mono master doesn't work, or the tip of mono-4.0.0-branch (d7f9ffaa25d45316db27df4892c4c30533ed646e) doesn't work ?
Comment 4 Andrew Katz 2015-05-12 11:56:25 UTC
The tip of mono-4-0-0-branch doesnt work.  Works - 5a0b19f1a156e36ee244686fa936f95702f9f927.  Doesnt work - e28071072213c8a366e71370b3424e8e197a319c
Comment 5 Zoltan Varga 2015-05-12 11:58:54 UTC
There is only one commit between the two, e28071072213c8a366e71370b3424e8e197a319c, which looks ok to me.
Comment 6 Andrew Katz 2015-05-12 12:01:25 UTC
Yes, I believe that commit is causing the crash, although I am not sure why.
Comment 7 Andrew Katz 2015-05-12 12:23:02 UTC
I am doing a bit more testing.  It looks like I may have the commit wrong that is causing the crash.
Comment 8 Arnauld 2015-07-03 07:02:36 UTC
Created attachment 11842 [details]
F# Script that always fail

The following script always fail when I:

1. Ctrl+A (to select all)
2. Ctrl+Enter (send it to the interactive execution)

I'm on Mac OSX - Yosemite 10.10.3 (14D136)

Xamarin Studio
Version 5.9.4 (build 5)
Installation UUID: 8b582a32-98b6-45bc-a7b1-ad73047db24a
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

Execution output:

> F# Interactive for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
For help type #help;;

> 
Expected.: 3
Actual...: 3
Expected.: [Miami; Washington; Chicago]
Actual...: [Chicago; Miami; Washington]
* Assertion at mini-generic-sharing.c:918, condition `oti' not met
Stacktrace:
  at <unknown> <0xffffffff>
  at FSI_0002/AreEqual@11-1.Invoke (a) <0x0002b>
  at Microsoft.FSharp.Core.FSharpFunc`2.InvokeFast<V> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.FSharpFunc`2<TResult, V>>,T,TResult) <0x00071>
  at FSI_0002.AreEqual<a> (a,a) <0x001f3>
  at <StartupCode$FSI_0002>.$FSI_0002.main@ () <0x00dd3>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000d0>
  at System.MonoType.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x003b0>
  at System.Reflection.Emit.TypeBuilder.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x00066>
  at System.Type.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Globalization.CultureInfo) <0x0005a>
  at Microsoft.FSharp.Compiler.AbstractIL.ILRuntimeWriter/execEntryPtFun@1986-1.Invoke (Microsoft.FSharp.Core.Unit) <0x00083>
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@883-37.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.FSharpOption`1<System.Exception>>) <0x00019>
  at Microsoft.FSharp.Primitives.Basics.List.iter<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00038>
  at Microsoft.FSharp.Collections.ListModule.Iterate<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00027>
  at Microsoft.FSharp.Compiler.Interactive.Shell.arg10@882 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.FSharpOption`1<System.Exception>>>,Microsoft.FSharp.Core.Unit) <0x00057>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.ProcessInputs (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/ParsedInput>,bool,bool,bool,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/Ident>) <0x006e7>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.EvalParsedDefinitions (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,bool,bool,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/SynModuleDecl>) <0x001d7>
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@1590-45.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x0136f>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.InteractiveCatch<a> (Microsoft.FSharp.Core.FSharpFunc`2<a, System.Tuple`2<a, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>,a) <0x00039>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ExecInteraction (bool,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction) <0x00067>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ExecInteractions (bool,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>) <0x005f3>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.MainThreadProcessParsedInteraction (bool,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x00133>
  at Microsoft.FSharp.Compiler.Interactive.Shell/res@1782.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x00033>
  at Microsoft.FSharp.Compiler.Interactive.Shell/runCodeOnMainThread@2021-2.Invoke (Microsoft.FSharp.Core.Unit) <0x0003b>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux/Microsoft-FSharp-Compiler-Interactive-IEventLoop-Invoke@47.Invoke (Microsoft.FSharp.Core.Unit) <0x0001a>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux/run@38-4.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, object>) <0x00039>
  at Microsoft.FSharp.Primitives.Basics.List.iter<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00038>
  at Microsoft.FSharp.Collections.ListModule.Iterate<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00027>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux.run@35 (Microsoft.FSharp.Compiler.Interactive.SimpleEventLoop,Microsoft.FSharp.Core.Unit) <0x000cb>
  at Microsoft.FSharp.Compiler.Interactive.SimpleEventLoop.Microsoft-FSharp-Compiler-Interactive-IEventLoop-Run () <0x0001f>
  at Microsoft.FSharp.Compiler.Interactive.Shell.runLoop@2066 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiConsoleOutput,Microsoft.FSharp.Core.Unit) <0x00205>
  at Microsoft.FSharp.Compiler.Interactive.Shell.DriveFsiEventLoop (Microsoft.FSharp.Compiler.Interactive.Shell/FsiConsoleOutput) <0x0001b>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiEvaluationSession.Run () <0x00bd7>
  at Microsoft.FSharp.Compiler.Interactive.Shell.evaluateSession@2382 (string[],Microsoft.FSharp.Core.Unit) <0x0009b>
  at Microsoft.FSharp.Compiler.Interactive.Shell.MainMain (string[]) <0x00127>
  at Microsoft.FSharp.Compiler.Interactive.Main.FsiMain (string[]) <0x00013>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
	0   mono                                0x00141956 mono_handle_native_sigsegv + 342
	1   mono                                0x00191fa1 sigabrt_signal_handler + 129
	2   libsystem_platform.dylib            0x97a0803b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x91f3deee abort + 156
	5   mono                                0x002e18e1 monoeg_log_default_handler + 129
	6   mono                                0x002e19db monoeg_assertion_message + 107
	7   mono                                0x0014b5ed fill_runtime_generic_context + 669
	8   mono                                0x0014b20d mono_class_fill_runtime_generic_context + 157
	9   mono                                0x00144456 mono_rgctx_lazy_fetch_trampoline + 134
	10  ???                                 0x004b3489 0x0 + 4928649
Debug info from gdb:
(lldb) command source -s 1 '/tmp/mono-gdb-commands.luUX4b'
warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
=================================================================
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.
=================================================================
Process 84983 detached
(lldb) 

Session termination detected. Press Enter to restart.

F# Interactive for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
For help type #help;;

> 
> 
Expected.: 3
Actual...: 3
Expected.: [Miami; Washington; Chicago]
Actual...: [Chicago; Miami; Washington]
* Assertion at mini-generic-sharing.c:918, condition `oti' not met
Stacktrace:
  at <unknown> <0xffffffff>
  at FSI_0002/AreEqual@11-1.Invoke (a) <0x0002b>
  at Microsoft.FSharp.Core.FSharpFunc`2.InvokeFast<V> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.FSharpFunc`2<TResult, V>>,T,TResult) <0x00071>
  at FSI_0002.AreEqual<a> (a,a) <0x001f3>
  at <StartupCode$FSI_0002>.$FSI_0002.main@ () <0x00dd3>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000d0>
  at System.MonoType.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x003b0>
  at System.Reflection.Emit.TypeBuilder.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x00066>
  at System.Type.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Globalization.CultureInfo) <0x0005a>
  at Microsoft.FSharp.Compiler.AbstractIL.ILRuntimeWriter/execEntryPtFun@1986-1.Invoke (Microsoft.FSharp.Core.Unit) <0x00083>
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@883-37.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.FSharpOption`1<System.Exception>>) <0x00019>
  at Microsoft.FSharp.Primitives.Basics.List.iter<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00038>
  at Microsoft.FSharp.Collections.ListModule.Iterate<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00027>
  at Microsoft.FSharp.Compiler.Interactive.Shell.arg10@882 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.FSharpOption`1<System.Exception>>>,Microsoft.FSharp.Core.Unit) <0x00057>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.ProcessInputs (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/ParsedInput>,bool,bool,bool,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/Ident>) <0x006e7>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.EvalParsedDefinitions (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,bool,bool,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/SynModuleDecl>) <0x001d7>
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@1590-45.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x0136f>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.InteractiveCatch<a> (Microsoft.FSharp.Core.FSharpFunc`2<a, System.Tuple`2<a, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>,a) <0x00039>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ExecInteraction (bool,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction) <0x00067>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ExecInteractions (bool,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>) <0x005f3>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.MainThreadProcessParsedInteraction (bool,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x00133>
  at Microsoft.FSharp.Compiler.Interactive.Shell/res@1782.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) <0x00033>
  at Microsoft.FSharp.Compiler.Interactive.Shell/runCodeOnMainThread@2021-2.Invoke (Microsoft.FSharp.Core.Unit) <0x0003b>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux/Microsoft-FSharp-Compiler-Interactive-IEventLoop-Invoke@47.Invoke (Microsoft.FSharp.Core.Unit) <0x0001a>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux/run@38-4.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, object>) <0x00039>
  at Microsoft.FSharp.Primitives.Basics.List.iter<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00038>
  at Microsoft.FSharp.Collections.ListModule.Iterate<T> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T>) <0x00027>
  at <StartupCode$FSharp-Compiler-Interactive-Settings>.$Fsiaux.run@35 (Microsoft.FSharp.Compiler.Interactive.SimpleEventLoop,Microsoft.FSharp.Core.Unit) <0x000cb>
  at Microsoft.FSharp.Compiler.Interactive.SimpleEventLoop.Microsoft-FSharp-Compiler-Interactive-IEventLoop-Run () <0x0001f>
  at Microsoft.FSharp.Compiler.Interactive.Shell.runLoop@2066 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiConsoleOutput,Microsoft.FSharp.Core.Unit) <0x00205>
  at Microsoft.FSharp.Compiler.Interactive.Shell.DriveFsiEventLoop (Microsoft.FSharp.Compiler.Interactive.Shell/FsiConsoleOutput) <0x0001b>
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiEvaluationSession.Run () <0x00bd7>
  at Microsoft.FSharp.Compiler.Interactive.Shell.evaluateSession@2382 (string[],Microsoft.FSharp.Core.Unit) <0x0009b>
  at Microsoft.FSharp.Compiler.Interactive.Shell.MainMain (string[]) <0x00127>
  at Microsoft.FSharp.Compiler.Interactive.Main.FsiMain (string[]) <0x00013>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
	0   mono                                0x0011f956 mono_handle_native_sigsegv + 342
	1   mono                                0x0016ffa1 sigabrt_signal_handler + 129
	2   libsystem_platform.dylib            0x97a0803b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x91f3deee abort + 156
	5   mono                                0x002bf8e1 monoeg_log_default_handler + 129
	6   mono                                0x002bf9db monoeg_assertion_message + 107
	7   mono                                0x001295ed fill_runtime_generic_context + 669
	8   mono                                0x0012920d mono_class_fill_runtime_generic_context + 157
	9   mono                                0x00122456 mono_rgctx_lazy_fetch_trampoline + 134
	10  ???                                 0x00491489 0x0 + 4789385
Debug info from gdb:
(lldb) command source -s 1 '/tmp/mono-gdb-commands.PeVSZx'
warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.2/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
=================================================================
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.
=================================================================
Process 84990 detached
(lldb) 

Session termination detected. Press Enter to restart.
Comment 9 Arnauld 2015-07-03 07:24:37 UTC
Don't know if it is related but I got a similar error with the following script
https://gist.github.com/Arnauld/e4921673c9d375e19717

the output
https://gist.github.com/Arnauld/721e1857201476667862
Comment 10 Arnauld 2015-07-03 14:40:21 UTC
From comment#9

when type is explicit

from:
   let shuffle cards = ...

to
   let shuffle (cards:Card list) = ...

crash does not occurs anymore
Comment 11 Zoltan Varga 2015-07-06 15:34:53 UTC
Can't reproduce this with Mono JIT compiler version 4.0.2 ((detached/198235d Tue Jun  9 14:24:40 EDT 2015) on osx when saving the testcase into a file, and running it with:

fsharpi --use:foo.fs

Note You need to log in before you can comment on or make changes to this bug.