Bug 58321 - fsharpi crashes when binding arrays of objects with mutable bindings
Summary: fsharpi crashes when binding arrays of objects with mutable bindings
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection (show other bugs)
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-23 12:21 UTC by Jon Sporring
Modified: 2017-10-06 22:09 UTC (History)
4 users (show)

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


Attachments
Simple program that causes fsharpi to crash (182 bytes, text/plain)
2017-07-23 12:21 UTC, Jon Sporring
Details

Description Jon Sporring 2017-07-23 12:21:31 UTC
Created attachment 23738 [details]
Simple program that causes fsharpi to crash

The command line program 'fsharpi' crashes, when creating an array of objects containing mutable variables. It seems to be related to mutable.

The details: I'm using macOS v. 10.12.5 and

$ mono --version
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 18 16:11:37 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.6.0svn-mono-master/8b1520c)
	GC:            sgen (concurrent by default)

The following program saved as fsharpiCrashExample.fsx and enclosed as an attachement:

type coordinate(pos : int * int) =
  let mutable _p = pos // mutable makes fsharpi crash!
  member this.elm with get() = _p and set(p) = _p <- p
let pieces = [| coordinate((0,0)) |]

runs without problems, using:

$ fsharpc fsharpiCrashExample.fsx && mono fsharpiCrashExample.exe
F# Compiler for F# 4.1
Freely distributed under the Apache 2.0 Open Source License

However, not when run from the command line using:

$ fsharpi fsharpiCrashExample.fsx 
* Assertion: should not be reached at class-accessors.c:73

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0x00012>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00032] in <ffb99659fc1c47faa4d5f883014d08aa>:0
  at System.RuntimeType.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) [0x00680] in <ffb99659fc1c47faa4d5f883014d08aa>:0
  at System.Reflection.Emit.TypeBuilder.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) [0x00006] in <ffb99659fc1c47faa4d5f883014d08aa>:0
  at System.Type.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Globalization.CultureInfo) [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0
  at Microsoft.FSharp.Compiler.AbstractIL.ILRuntimeWriter/execEntryPtFun@2055-1.Invoke (Microsoft.FSharp.Core.Unit) [0x00020] in <591e07ae7f81fe20a7450383ae071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@1069-36.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.FSharpOption`1<System.Exception>>) [0x00001] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Primitives.Basics.List.iter<T_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T_REF>) [0x00019] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Collections.ListModule.Iterate<T_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Collections.FSharpList`1<T_REF>) [0x00001] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.arg10@1068 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,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) [0x0000a] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.ProcessInputs (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,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>) [0x002ed] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompiler.EvalParsedDefinitions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,bool,bool,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Ast/SynModuleDecl>) [0x0007b] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@1864-45.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00ac2] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.InteractiveCatch<b_REF> (Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.FSharpFunc`2<b_REF, System.Tuple`2<b_REF, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>,b_REF) [0x00018] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ExecInteraction (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.CompileOps/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger) [0x00010] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.execParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.CompileOps/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>) [0x002a4] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/clo@2045-48.Invoke (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.CompileOps/TcConfig,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00003] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Core.FSharpFunc`2<T_REF, TResult_REF>.InvokeFast<V_REF, W_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.FSharpFunc`2<TResult_REF, Microsoft.FSharp.Core.FSharpFunc`2<V_REF, W_REF>>>,T_REF,TResult_REF,V_REF) [0x0000d] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.mainThreadProcessAction<a_REF, b_REF> (a_REF,Microsoft.FSharp.Core.FSharpFunc`2<a_REF, Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.CompileOps/TcConfig, Microsoft.FSharp.Core.FSharpFunc`2<b_REF, System.Tuple`2<b_REF, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>>>,b_REF) [0x0004a] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.mainThreadProcessParsedInteractions (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x0000b] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/res@2108-1.Invoke (Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,System.Tuple`2<Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>, Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState>) [0x0000f] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Core.OptimizedClosures/Invoke@3253<T2_REF, TResult_REF, T1_REF>.Invoke (T2_REF) [0x00001] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/res@2108-4.Invoke (System.Tuple`2<Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Compiler.Ast/ParsedFsiInteraction>, Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState>) [0x0001c] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Core.FSharpFunc`2<T_REF, TResult_REF>.InvokeFast<V_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.FSharpFunc`2<TResult_REF, V_REF>>,T_REF,TResult_REF) [0x0001f] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Core.FSharpFunc`2<T_REF, TResult_REF>.InvokeFast<V_REF, W_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.FSharpFunc`2<TResult_REF, Microsoft.FSharp.Core.FSharpFunc`2<V_REF, W_REF>>>,T_REF,TResult_REF,V_REF) [0x0003d] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/res@2108<a_REF>.Invoke (a_REF,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x0001f] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Core.FSharpFunc`2<T_REF, TResult_REF>.InvokeFast<V_REF> (Microsoft.FSharp.Core.FSharpFunc`2<T_REF, Microsoft.FSharp.Core.FSharpFunc`2<TResult_REF, V_REF>>,T_REF,TResult_REF) [0x0000d] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/run@2127-1.Invoke (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken, Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, System.Tuple`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>>,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00001] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Core.OptimizedClosures/Invoke@3253<T2_REF, TResult_REF, T1_REF>.Invoke (T2_REF) [0x00001] in <591e0742dff9fae1a745038342071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/ParseAndExecOneSetOfInteractionsFromLexbuf@2097<a_REF>.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00090] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.InteractiveCatch<b_REF> (Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.FSharpFunc`2<b_REF, System.Tuple`2<b_REF, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>,b_REF) [0x00018] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.ParseAndExecOneSetOfInteractionsFromLexbuf<a_REF> (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.FSharpFunc`2<a_REF, Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, System.Tuple`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>>, Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, System.Tuple`2<Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>>,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Compiler.LexFilter/LexFilter,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger) [0x0006c] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.run@2126 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor,Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Compiler.LexFilter/LexFilter,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00008] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/EvalIncludedScript@2122.Invoke (Microsoft.FSharp.Core.Unit) [0x00036] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.WithImplicitHome<a_REF> (Microsoft.FSharp.Compiler.CompileOps/TcConfigBuilder,string,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, a_REF>) [0x00010] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.EvalIncludedScript (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,string,Microsoft.FSharp.Compiler.Range/range,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger) [0x00035] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/EvalIncludedScripts@2146.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState) [0x00001] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.InteractiveCatch<b_REF> (Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.FSharpFunc`2<b_REF, System.Tuple`2<b_REF, Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionStepStatus>>,b_REF) [0x00018] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.EvalIncludedScripts (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Collections.FSharpList`1<string>,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger) [0x00026] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.consume@2156 (Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor,Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Compiler.Interactive.Shell/FsiDynamicCompilerState,Microsoft.FSharp.Collections.FSharpList`1<System.Tuple`2<string, bool>>) [0x00043] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiInteractionProcessor.LoadInitialFiles (Microsoft.FSharp.Compiler.AbstractIL.Internal.Library/CompilationThreadToken,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger) [0x00007] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell/FsiEvaluationSession.Run () [0x0026f] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.evaluateSession@2892 (string[],Microsoft.FSharp.Core.Unit) [0x00112] in <591e07dc046a099ca7450383dc071e59>:0
  at Microsoft.FSharp.Compiler.Interactive.Shell.MainMain (string[]) [0x0007d] in <591e07dc046a099ca7450383dc071e59>:0
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) [0x00054] in <591e07dc046a099ca7450383dc071e59>:0

Native stacktrace:

	0   mono                                0x00139a54 mono_handle_native_crash + 324
	1   mono                                0x00199873 sigabrt_signal_handler + 147
	2   libsystem_platform.dylib            0xa1733e5b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0xa15b9a34 abort + 141
	5   mono                                0x003194ec mono_log_write_logfile + 380
	6   mono                                0x00313d52 structured_log_adapter + 50
	7   mono                                0x00331ecb monoeg_assertion_message + 107
	8   mono                                0x001cda7f mono_class_get_flags + 127
	9   mono                                0x001be0f7 mono_class_init + 1127
	10  mono                                0x001c9927 mono_class_is_assignable_from + 55
	11  mono                                0x0029d78a mono_object_handle_isinst + 106
	12  mono                                0x0029d801 mono_object_isinst_checked + 81
	13  mono                                0x00202401 mono_object_isinst_icall + 33
	14  ???                                 0x004f69c8 0x0 + 5204424
	15  ???                                 0x068690c9 0x0 + 109482185
	16  ???                                 0x06869187 0x0 + 109482375
	17  mono                                0x0007fdc5 mono_jit_runtime_invoke + 1557
	18  mono                                0x00297410 do_runtime_invoke + 96
	19  mono                                0x0029b327 mono_runtime_try_invoke_array + 1383
	20  mono                                0x0029b999 mono_runtime_invoke_array_checked + 57
	21  mono                                0x001ea63a ves_icall_InternalInvoke + 794
	22  ???                                 0x00503470 0x0 + 5256304
	23  mscorlib.dll.dylib                  0x01a4c68b System_Reflection_MonoMethod_Invoke_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo + 155
	24  mscorlib.dll.dylib                  0x0180cd24 System_RuntimeType_InvokeMember_string_System_Reflection_BindingFlags_System_Reflection_Binder_object_object___System_Reflection_ParameterModifier___System_Globalization_CultureInfo_string__ + 3332
	25  mscorlib.dll.dylib                  0x01a94cf7 System_Reflection_Emit_TypeBuilder_InvokeMember_string_System_Reflection_BindingFlags_System_Reflection_Binder_object_object___System_Reflection_ParameterModifier___System_Globalization_CultureInfo_string__ + 103
	26  mscorlib.dll.dylib                  0x0181a12b System_Type_InvokeMember_string_System_Reflection_BindingFlags_System_Reflection_Binder_object_object___System_Globalization_CultureInfo + 91
	27  ???                                 0x06868d1c 0x0 + 109481244
	28  ???                                 0x06868b14 0x0 + 109480724
	29  ???                                 0x03063659 0x0 + 50738777
	30  ???                                 0x03063610 0x0 + 50738704
	31  ???                                 0x06868a88 0x0 + 109480584
	32  ???                                 0x04e78308 0x0 + 82281224
	33  ???                                 0x04e75d1c 0x0 + 82271516
	34  ???                                 0x04e75984 0x0 + 82270596
	35  ???                                 0x042edbfe 0x0 + 70179838
	36  ???                                 0x04e74460 0x0 + 82265184
	37  ???                                 0x04e730d0 0x0 + 82260176
	38  ???                                 0x04e72754 0x0 + 82257748
	39  ???                                 0x047ef5ed 0x0 + 75429357
	40  ???                                 0x04e72384 0x0 + 82256772
	41  ???                                 0x04e721cc 0x0 + 82256332
	42  ???                                 0x04e72154 0x0 + 82256212
	43  ???                                 0x03069ffd 0x0 + 50765821
	44  ???                                 0x04e7210a 0x0 + 82256138
	45  ???                                 0x0303bee7 0x0 + 50577127
	46  ???                                 0x047ef690 0x0 + 75429520
	47  ???                                 0x04e71ec8 0x0 + 82255560
	48  ???                                 0x0303bec7 0x0 + 50577095
	49  ???                                 0x04e71e00 0x0 + 82255360
	50  ???                                 0x03069ffd 0x0 + 50765821
	51  ???                                 0x042efa51 0x0 + 70187601
	52  ???                                 0x042edbfe 0x0 + 70179838
	53  ???                                 0x042ef688 0x0 + 70186632
	54  ???                                 0x042ef4c8 0x0 + 70186184
	55  ???                                 0x042ee310 0x0 + 70181648
	56  ???                                 0x042ee254 0x0 + 70181460
	57  ???                                 0x042ede50 0x0 + 70180432
	58  ???                                 0x042edd70 0x0 + 70180208
	59  ???                                 0x042edbfe 0x0 + 70179838
	60  ???                                 0x042eda88 0x0 + 70179464
	61  ???                                 0x042ed5d8 0x0 + 70178264
	62  ???                                 0x042ed4a4 0x0 + 70177956
	63  ???                                 0x042ed22c 0x0 + 70177324
	64  ???                                 0x004f994c 0x0 + 5216588
	65  ???                                 0x004f61d8 0x0 + 5202392
	66  ???                                 0x004f63da 0x0 + 5202906
	67  mono                                0x0007fdc5 mono_jit_runtime_invoke + 1557
	68  mono                                0x00297410 do_runtime_invoke + 96
	69  mono                                0x0029acc7 do_exec_main_checked + 151
	70  mono                                0x00299999 mono_runtime_run_main_checked + 73
	71  mono                                0x000fb0e7 mono_jit_exec + 311
	72  mono                                0x000fda52 mono_main + 9410
	73  mono                                0x0006f16b main + 2011
	74  mono                                0x0006e985 start + 53

Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.dkoLrh'
Executing commands in '/tmp/mono-gdb-commands.dkoLrh'.
(lldb) process attach --pid 32494
warning: (i386) /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 32494 stopped
* thread #1, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0xa1659c4a libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
->  0xa1659c4a <+10>: jae    0xa1659c5a                ; <+26>
    0xa1659c4c <+12>: calll  0xa1659c51                ; <+17>
    0xa1659c51 <+17>: popl   %edx
    0xa1659c52 <+18>: movl   0x58d53d7(%edx), %edx

Executable module set to "/Library/Frameworks/Mono.framework/Versions/5.0.1/bin/mono".
Architecture set to: i386-apple-macosx.
(lldb) thread list
Process 32494 stopped
* thread #1: tid = 0x440b53, 0xa1659c4a libsystem_kernel.dylib`__wait4 + 10, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x440b54, 0xa165930e libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
  thread #3: tid = 0x440b55, 0xa165195a libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
  thread #4: tid = 0x440b56, 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #5: tid = 0x440b57, 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #6: tid = 0x440b58, 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) thread backtrace all
* thread #1, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0xa1659c4a libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0xa15d82ef libsystem_c.dylib`waitpid$UNIX2003 + 32
    frame #2: 0x00139b27 mono`mono_handle_native_crash(signal=<unavailable>, ctx=0xbff92d9c, info=0xbff92d5c) at mini-exceptions.c:2567 [opt]
    frame #3: 0x00199873 mono`sigabrt_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) at mini-posix.c:208 [opt]
    frame #4: 0xa1733e5b libsystem_platform.dylib`_sigtramp + 43

  thread #2, name = 'SGen worker'
    frame #0: 0xa165930e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0xa173deb0 libsystem_pthread.dylib`_pthread_cond_wait + 647
    frame #2: 0xa173f844 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 51
    frame #3: 0x0030ffb1 mono`thread_func [inlined] mono_os_cond_wait(mutex=0x00405c8c) at mono-os-mutex.h:146 [opt]
    frame #4: 0x0030ff9f mono`thread_func(thread_data=0x00000000) at sgen-thread-pool.c:129 [opt]
    frame #5: 0xa173d047 libsystem_pthread.dylib`_pthread_body + 184
    frame #6: 0xa173cf8f libsystem_pthread.dylib`_pthread_start + 243
    frame #7: 0xa173c84a libsystem_pthread.dylib`thread_start + 34

  thread #3, name = 'Finalizer'
    frame #0: 0xa165195a libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0028f976 mono`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:90 [opt]
    frame #2: 0x0028f968 mono`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-coop-semaphore.h:40 [opt]
    frame #3: 0x0028f95e mono`finalizer_thread(unused=0x00000000) at gc.c:907 [opt]
    frame #4: 0x0025fce4 mono`start_wrapper [inlined] start_wrapper_internal at threads.c:837 [opt]
    frame #5: 0x0025fba2 mono`start_wrapper(data=<unavailable>) at threads.c:889 [opt]
    frame #6: 0x00326bf0 mono`inner_start_thread(data=<unavailable>) at mono-threads.c:1170 [opt]
    frame #7: 0xa173d047 libsystem_pthread.dylib`_pthread_body + 184
    frame #8: 0xa173cf8f libsystem_pthread.dylib`_pthread_start + 243
    frame #9: 0xa173c84a libsystem_pthread.dylib`thread_start + 34

  thread #4
    frame #0: 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0xa173cd06 libsystem_pthread.dylib`_pthread_wqthread + 1210
    frame #2: 0xa173c826 libsystem_pthread.dylib`start_wqthread + 34

  thread #5
    frame #0: 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0xa173cd06 libsystem_pthread.dylib`_pthread_wqthread + 1210
    frame #2: 0xa173c826 libsystem_pthread.dylib`start_wqthread + 34

  thread #6
    frame #0: 0xa1659cba libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0xa173cb95 libsystem_pthread.dylib`_pthread_wqthread + 841
    frame #2: 0xa173c826 libsystem_pthread.dylib`start_wqthread + 34
(lldb) detach

=================================================================
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 32494 detached
(lldb) quit
Abort trap: 6
Comment 1 Ludovic Henry 2017-10-06 22:09:37 UTC
I cannot reproduce with Mono 5.4.0.167 (2017-06/6b8abfeb7cc) with provided reproduction case.

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