Bug 25766 - F# + PCL lib crashes debugger on start
Summary: F# + PCL lib crashes debugger on start
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: 3.10.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-01-07 04:02 UTC by henrik
Modified: 2018-03-01 16:02 UTC (History)
4 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description henrik 2015-01-07 04:02:33 UTC
Create a new F# app and create a type that uses an attribute or inheritance from a PCL-compiled-library. We're using https://github.com/oysteinkrog/SQLite.Net-PCL. Target .Net 4.5. Configure the debugger to use all code (not just your own).

Now compile it many times and work throughout the day.

After a while, the debugger / XS will start crashing and asking for administrator rights:

User assembly '/Users/YourCode/bin/Debug/YourCode.exe' is missing. Debugger will now debug all code, not just user code.
Loaded assembly: /Users/YourCode/bin/Debug/YourCode.exe
Loaded assembly: /Users/YourCode/bin/Debug/FSharp.Core.dll
Loaded assembly: /Users/YourCode/bin/Debug/Logary.dll
Loaded assembly: /Users/YourCode/bin/Debug/NodaTime.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
Loaded assembly: /Users/YourCode/bin/Debug/Suave.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
Loaded assembly: /Users/YourCode/bin/Debug/FSharp.Actor.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
D 2015-01-07T08:51:08.3645160+00:00: logary/target/cons pre-start Status: Shutdown "" [FSharp.Actor]
Thread started: <Thread Pool> #2
Thread started: <Thread Pool> #3
D 2015-01-07T08:51:08.3852530+00:00: logary/target/cons started Status: Running [FSharp.Actor]
D 2015-01-07T08:51:08.4267070+00:00: logary/target/console pre-start Status: Shutdown "" [FSharp.Actor]
D 2015-01-07T08:51:08.4269360+00:00: logary/target/console started Status: Running [FSharp.Actor]
D 2015-01-07T08:51:08.4323330+00:00: logary/probe/wperf pre-start Status: Shutdown "" [FSharp.Actor]
D 2015-01-07T08:51:08.4325660+00:00: logary/probe/wperf started Status: Running [FSharp.Actor]
D 2015-01-07T08:51:08.4353250+00:00: logary/supervisor pre-start Status: Shutdown "" [FSharp.Actor]
D 2015-01-07T08:51:08.4355800+00:00: logary/supervisor started Status: Running [FSharp.Actor]
D 2015-01-07T08:51:08.4660600+00:00: logary/scheduler pre-start Status: Shutdown "" [FSharp.Actor]
D 2015-01-07T08:51:08.4663140+00:00: logary/scheduler started Status: Running [FSharp.Actor]
D 2015-01-07T08:51:08.4680880+00:00: logary/registry pre-start Status: Shutdown "" [FSharp.Actor]
D 2015-01-07T08:51:08.4683220+00:00: logary/registry started Status: Running [FSharp.Actor]
Loaded assembly: /Users/YourCode/bin/Debug/UnionArgParser.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
Loaded assembly: /Users/YourCode/bin/Debug/Newtonsoft.Json.dll
Loaded assembly: /Users/YourCode/bin/Debug/Logary.Suave.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
Thread started: <Thread Pool> #4
Thread started: <Thread Pool> #5
Thread started: <Thread Pool> #6
Thread started: <Thread Pool> #7
Thread started: <Thread Pool> #8
Thread started:  #9
Thread started: <Thread Pool> #10
Loaded assembly: /Users/YourCode/bin/Debug/SQLite.Net.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Facades/System.Runtime.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Facades/System.Runtime.Extensions.dll
Loaded assembly: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Facades/System.Collections.dll
Loaded assembly: /Users/YourCode/bin/Debug/SQLite.Net.Platform.Generic.dll
* Assertion: should not be reached at exceptions-x86.c:887

Stacktrace:

  at <unknown> <0xffffffff>
  at YourCode.ReadModels/Database..ctor (string) [0x00000] in /Users/YourCode/ReadModels.fs:31
  at ReadModels/Impl/ensure_subscriptions@168.Invoke (Microsoft.FSharp.Core.Unit) [0x0001c] in /Users/YourCode/ReadModels.fs:170
  at Microsoft.FSharp.Control.AsyncBuilderImpl/callA@803.Invoke (Microsoft.FSharp.Control.AsyncParams`1<b>) <IL 0x00053, 0x00161>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/bindA@781.Invoke (Microsoft.FSharp.Control.AsyncParams`1<b>) <IL 0x00083, 0x00251>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/callA@803.Invoke (Microsoft.FSharp.Control.AsyncParams`1<b>) <IL 0x000f0, 0x004e9>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/callA@803.Invoke (Microsoft.FSharp.Control.AsyncParams`1<b>) <IL 0x000f0, 0x004e9>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/args@787-1.Invoke (a) <IL 0x0006e, 0x00247>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/resultA@769.Invoke (Microsoft.FSharp.Control.AsyncParams`1<a>) <IL 0x0006f, 0x001ee>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/args@787-1.Invoke (a) <IL 0x0006e, 0x00247>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/resultA@769.Invoke (Microsoft.FSharp.Control.AsyncParams`1<a>) <IL 0x0006f, 0x001ee>
  at Microsoft.FSharp.Control.AsyncBuilderImpl/args@787-1.Invoke (a) <IL 0x0006e, 0x00247>
  at Microsoft.FSharp.Control.TaskHelpers/continuation@1423-1.Invoke (Microsoft.FSharp.Core.Unit) <IL 0x00069, 0x00194>
  at <StartupCode$FSharp-Core>.$Control.loop@425-40 (Microsoft.FSharp.Control.Trampoline,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Control.FakeUnitValue>) <IL 0x00003, 0x00042>
  at Microsoft.FSharp.Control.Trampoline.ExecuteAction (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Control.FakeUnitValue>) <IL 0x0001a, 0x000cf>
  at Microsoft.FSharp.Control.TrampolineHolder.Protect (Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Control.FakeUnitValue>) <IL 0x00039, 0x00137>
  at Microsoft.FSharp.Control.TaskHelpers.continuation@1422<T> (Microsoft.FSharp.Control.AsyncParams`1<T>,Microsoft.FSharp.Control.AsyncParamsAux,System.Threading.Tasks.Task`1<T>) <IL 0x0000f, 0x00097>
  at Microsoft.FSharp.Control.TaskHelpers/continueWith@1430.Invoke (System.Threading.Tasks.Task`1<T>) <IL 0x0000e, 0x00063>
  at System.Threading.Tasks.TaskActionInvoker/ActionTaskInvoke`1.Invoke (System.Threading.Tasks.Task,object,System.Threading.Tasks.Task) [0x00000] in /private/tmp/source-mono-mac-3.10.0-branch/bockbuild-mono-3.10.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.10.0/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:200
  at System.Threading.Tasks.Task.InnerInvoke () [0x00019] in /private/tmp/source-mono-mac-3.10.0-branch/bockbuild-mono-3.10.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.10.0/mcs/class/corlib/System.Threading.Tasks/Task.cs:546
  at System.Threading.Tasks.Task.ThreadStart () [0x000d0] in /private/tmp/source-mono-mac-3.10.0-branch/bockbuild-mono-3.10.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.10.0/mcs/class/corlib/System.Threading.Tasks/Task.cs:438
  at System.Threading.Tasks.Task.Execute () [0x00000] in /private/tmp/source-mono-mac-3.10.0-branch/bockbuild-mono-3.10.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.10.0/mcs/class/corlib/System.Threading.Tasks/Task.cs:514
  at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (object) [0x00007] in /private/tmp/source-mono-mac-3.10.0-branch/bockbuild-mono-3.10.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.10.0/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs:59
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>

Native stacktrace:

	0   mono                                0x00177346 mono_handle_native_sigsegv + 342
	1   mono                                0x001cbcba sigabrt_signal_handler + 122
	2   libsystem_platform.dylib            0x9006adeb _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x97c1a29c abort + 155
	5   mono                                0x00328551 monoeg_log_default_handler + 129
	6   mono                                0x0032864b monoeg_assertion_message + 107
	7   mono                                0x001c76dd mono_arch_find_jit_info + 765
	8   mono                                0x00173d2d mono_find_jit_info_ext + 237
	9   mono                                0x001745bb mono_walk_stack_full + 283
	10  mono                                0x0017343e mono_walk_stack_with_state + 206
	11  mono                                0x00198a08 thread_interrupt + 504
	12  mono                                0x0019ee71 notify_thread + 161
	13  mono                                0x0028bed2 mono_g_hash_table_foreach + 114
	14  mono                                0x0019eac1 suspend_vm + 193
	15  mono                                0x0019a257 process_event + 2999
	16  mono                                0x00197bd4 jit_end + 132
	17  mono                                0x0025bc2b mono_profiler_method_end_jit + 91
	18  mono                                0x000c7fb1 mono_jit_compile_method_with_opt + 3569
	19  mono                                0x000c7169 mono_jit_compile_method + 57
	20  mono                                0x00178a5f common_call_trampoline + 975
	21  mono                                0x0017867c mono_magic_trampoline + 60
	22  ???                                 0x00563088 0x0 + 5648520

Debug info from gdb:

^D
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
^D
quit
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
^D
quit
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
quit
^D
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
quit
^D
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
quit
^D
quit
^D
quit
^D
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
quit
^D
^D
quit
^D
quit
^D
quit
^D
quit
quit
^D
^D
quit
quit
^D
quit
^D
qu
Comment 1 henrik 2015-01-07 04:03:37 UTC
Using latest stable everything, but using Mavericks (for its stability).
Comment 2 Ludovic Henry 2018-02-28 22:53:39 UTC
Can you reproduce with latest Mono?
Comment 3 henrik 2018-03-01 08:26:56 UTC
You're three years too late to answer this.
Comment 4 Ludovic Henry 2018-03-01 16:02:53 UTC
Hello, we are going over all the bugs we have on bugzilla to make sure we are not missing any (even if they are quite old!). Sorry for the delay, and if you run into a new issue, please fill it up at https://github.com/mono/mono/issues. Thank you.