[Mono-dev] F# Interactive on Mono -> SIGABRT

Levi Greenspan greenspan.levi at googlemail.com
Thu Aug 21 18:29:55 EDT 2008


Hi,

I installed the Mono 2.0 Preview 2 on Ubuntu Linux 8.04 in order to run
F# (cf. http://research.microsoft.com/fsharp/fsharp.aspx). However
defining and applying a pretty simple function in the interactive shell
triggered some errors. A second application then resulted in a SIGABRT.
I have attached a logfile showing the interactive session incl.
stacktraces. Any ideas what could be wrong?

Many thanks,
Levi

-------------- next part --------------
MSR F# Interactive, (c) Microsoft Corporation, All Rights Reserved
F# Version 1.9.4.19, compiling for .NET Framework Version v2.0.50727

NOTE: 
NOTE: See 'fsi --help' for flags
NOTE: 
NOTE: Commands: #r <string>;;    reference (dynamically load) the given DLL. 
NOTE:           #I <string>;;    add the given search path for referenced DLLs. 
NOTE:           #use <string>;;  accept input from the given file. 
NOTE:           #load <string> ...<string>;;
NOTE:                            load the given file(s) as a compilation unit.
NOTE:           #time;;          toggle timing on/off. 
NOTE:           #types;;         toggle display of types on/off. 
NOTE:           #quit;;          exit. 
NOTE: 
NOTE: Visit the F# website at http://research.microsoft.com/fsharp.
NOTE: Bug reports to fsbugs at microsoft.com. Enjoy!

> let rec map (f: 'a -> 'b) (l : 'a list) =
    match l with
    | h::t -> f h :: map f t
    | []   -> [];;

val map : ('a -> 'b) -> 'a list -> 'b list

> map (fun x -> x * 2) [1 .. 10];;
System.TypeLoadException: A type load exception has occurred.
  at <StartupCode$FSI_0003>.$FSI_0003._main () [0x00000] 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 
stopped due to error
> map (fun x -> x * 2) [1 .. 10];;

** ERROR **: unknown type 0x1e in type_to_ldind
aborting...
Stacktrace:

  at <StartupCode$FSI_0004>.$FSI_0004._main () <0xffffffff>
  at <StartupCode$FSI_0004>.$FSI_0004._main () <0x00041>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00004>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000a6>
  at System.MonoType.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x00449>
  at System.Reflection.Emit.TypeBuilder.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,string[]) <0x00035>
  at System.Type.InvokeMember (string,System.Reflection.BindingFlags,System.Reflection.Binder,object,object[]) <0x00023>
  at execEntryPtFun at 1788_1.Invoke (Microsoft.FSharp.Core.Unit) <0x000b3>
  at processInputs at 762.Invoke (Microsoft.FSharp.Core.FastFunc`2) <0x00015>
  at Microsoft.FSharp.Collections.PrivateListHelpers.iter (Microsoft.FSharp.Core.FastFunc`2,Microsoft.FSharp.Collections.List`1) <0x00083>
  at Microsoft.FSharp.Collections.List`1.Iterate (Microsoft.FSharp.Core.FastFunc`2) <0x0000d>
  at processInputs at 761.Invoke (Microsoft.FSharp.Core.Unit) <0x00028>
  at TimeOpIf at 104.Invoke (Microsoft.FSharp.Core.FastFunc`2) <0x0002b>
  at Microsoft.FSharp.Compiler.Interactive.Shell.processInputs (int,Microsoft.FSharp.Compiler.Interactive.Shell/InteractionState,Microsoft.FSharp.Collections.List`1,bool,bool,Microsoft.FSharp.Collections.List`1) <0x01838>
  at Microsoft.FSharp.Compiler.Interactive.Shell.evalDefns (Microsoft.FSharp.Compiler.Interactive.Shell/InteractionState,bool,Microsoft.FSharp.Collections.List`1) <0x00268>
  at Microsoft.FSharp.Compiler.Interactive.Shell.evalExpr (Microsoft.FSharp.Compiler.Interactive.Shell/InteractionState,Microsoft.FSharp.Compiler.Ast/synexpr) <0x0037f>
  at Microsoft.FSharp.Compiler.Interactive.Shell.mainThreadProcessParsedInteraction (bool,Microsoft.FSharp.Core.FastFunc`2,Microsoft.FSharp.Core.Option`1,Microsoft.FSharp.Compiler.Interactive.Shell/InteractionState) <0x036b9>
  at res at 1213.Invoke (Microsoft.FSharp.Compiler.Interactive.Shell/InteractionState) <0x0001e>
  at runCodeOnMainThread at 1457@1434_1.Invoke (Microsoft.FSharp.Core.Unit) <0x00014>
  at workerThreadRunCodeOnWinFormsMainThread at 350.Invoke () <0x0001f>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00004>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000a6>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x0001a>
  at System.Delegate.DynamicInvokeImpl (object[]) <0x00170>
  at System.MulticastDelegate.DynamicInvokeImpl (object[]) <0x0002a>
  at System.Delegate.DynamicInvoke (object[]) <0x0000e>
  at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallback (object) <0x00042>
  at System.Security.SecurityContext.Run (System.Security.SecurityContext,System.Threading.ContextCallback,object) <0x000e9>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <0x00021>
  at System.Windows.Forms.XplatUIDriverSupport.ExecuteClientMessage (System.Runtime.InteropServices.GCHandle) <0x00064>
  at System.Windows.Forms.XplatUIX11.GetMessage (object,System.Windows.Forms.MSG&,intptr,int,int) <0x039ea>
  at System.Windows.Forms.XplatUI.GetMessage (object,System.Windows.Forms.MSG&,intptr,int,int) <0x00021>
  at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) <0x00aa6>
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) <0x0006a>
  at System.Windows.Forms.Application.Run () <0x0001d>
  at main at 1416.Run () <0x00066>
  at Microsoft.FSharp.Compiler.Interactive.Shell.runLoop at 1477@1477 () <0x001bf>
  at Microsoft.FSharp.Compiler.Interactive.Shell.main$cont at 1396@1396 () <0x00701>
  at <StartupCode$fsi>.$Microsoft.FSharp.Compiler.Interactive.Shell._main () <0x02440>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x806d522]
	[0xb7f55440]
	/lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7d1ba01]
	/usr/lib/libglib-2.0.so.0(g_logv+0x46a) [0xb7eca1fa]
	/usr/lib/libglib-2.0.so.0(g_log+0x29) [0xb7eca239]
	mono [0x80f124c]
	mono [0x8175b69]
	mono [0x81869f6]
	mono [0x819ceb0]
	mono [0x819f0c6]
	mono(mono_compile_method+0x18) [0x811d688]
	mono [0x80709ca]
	[0xb7b7d066]
	[0xb78ca1ae]
	mono [0x819fb19]
	mono(mono_runtime_invoke+0x27) [0x811d3e7]
	mono(mono_runtime_invoke_array+0x1e6) [0x81239b6]
	mono [0x8115ac4]
	[0xb663a870]
	[0xb663a0c7]
	[0xb6638122]
	[0xb55fecbe]
	[0xb6637c8c]
	[0xb55fe9c4]
	[0xb55fe886]
	[0xb55fe84c]
	[0xb55fe7b6]
	[0xb55fe739]
	[0xb55fe6fc]
	[0xb63668e1]
	[0xb6364c81]
	[0xb3ed3418]
	[0xb482cee2]
	[0xb4829817]
	[0xb48297ed]
	[0xb4829770]
	[0xb6688619]
	mono [0x819fb19]
	mono(mono_runtime_invoke+0x27) [0x811d3e7]
	mono(mono_runtime_invoke_array+0x1e6) [0x81239b6]
	mono [0x8115ac4]
	[0xb663a870]
	[0xb663a0c7]
	[0xb504b24b]
	[0xb48296e9]
	[0xb4829563]
	[0xb482952f]
	[0xb48294e3]
	[0xb48290ba]
	[0xb4828f42]
	[0xb4828e4d]
	[0xb466a04b]
	[0xb466665a]
	[0xb46660a7]
	[0xb466539b]
	[0xb4664c5e]
	[0xb4664bbf]
	[0xb46648d0]
	[0xb6364692]
	[0xb78cd861]
	[0xb78ca1ae]
	mono [0x819fb19]
	mono(mono_runtime_invoke+0x27) [0x811d3e7]
	mono(mono_runtime_exec_main+0xd4) [0x81219f4]
	mono(mono_runtime_run_main+0x226) [0x8121f36]
	mono(mono_main+0xa7b) [0x8059fdb]
	mono [0x8058fce]
	/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7d05450]
	mono [0x8058f11]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0xb7cad960 (LWP 19502)]
[New Thread 0xb44ffb90 (LWP 19511)]
[New Thread 0xb53ffb90 (LWP 19510)]
[New Thread 0xb74d6b90 (LWP 19504)]
[New Thread 0xb78c9b90 (LWP 19503)]
0xb7f55410 in __kernel_vsyscall ()
  5 Thread 0xb78c9b90 (LWP 19503)  0xb7f55410 in __kernel_vsyscall ()
  4 Thread 0xb74d6b90 (LWP 19504)  0xb7f55410 in __kernel_vsyscall ()
  3 Thread 0xb53ffb90 (LWP 19510)  0xb7f55410 in __kernel_vsyscall ()
  2 Thread 0xb44ffb90 (LWP 19511)  0xb7f55410 in __kernel_vsyscall ()
  1 Thread 0xb7cad960 (LWP 19502)  0xb7f55410 in __kernel_vsyscall ()

Thread 5 (Thread 0xb78c9b90 (LWP 19503)):
#0  0xb7f55410 in __kernel_vsyscall ()
#1  0xb7e70196 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081592de in collection_thread (unused=0x0) at collection.c:34
#3  0xb7e684fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7dc5e5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 4 (Thread 0xb74d6b90 (LWP 19504)):
#0  0xb7f55410 in __kernel_vsyscall ()
#1  0xb7e6caa5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081535ff in timedwait_signal_poll_cond (cond=0x82ba464, mutex=0x82ba44c, timeout=0x0, alertable=0) at handles.c:1492
#3  0x081536e0 in _wapi_handle_timedwait_signal_handle (handle=0x404, timeout=0x0, alertable=128) at handles.c:1572
#4  0x0815384a in _wapi_handle_wait_signal_handle (handle=0xfffffe00, alertable=-512) at handles.c:1532
#5  0x0813ca01 in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, alertable=0) at wait.c:205
#6  0x0810d4fb in finalizer_thread (unused=0x0) at gc.c:905
#7  0x080ed434 in start_wrapper (data=0x82cbbe0) at threads.c:621
#8  0x0813f182 in thread_start_routine (args=0x82ba6a4) at threads.c:279
#9  0x081641f4 in GC_start_routine (arg=0xfffffe00) at pthread_support.c:1382
#10 0xb7e684fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7dc5e5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb53ffb90 (LWP 19510)):
#0  0xb7f55410 in __kernel_vsyscall ()
#1  0xb7e70196 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0813df54 in SleepEx (ms=800, alertable=1) at threads.c:1018
#3  0x080ec688 in ves_icall_System_Threading_Thread_Sleep_internal (ms=-516) at threads.c:1052
#4  0xb6331c2e in ?? ()
#5  0xb6331b6e in ?? ()
#6  0xb633184e in ?? ()
#7  0xb6688619 in ?? ()
#8  0x0819fb19 in mono_jit_runtime_invoke (method=0x83fe4fc, obj=0x14bdf50, params=0xfffffdfc, exc=0xfffffdfc) at mini.c:13182
#9  0x0811d3e7 in mono_runtime_invoke (method=0xfffffdfc, obj=0xfffffdfc, params=0xfffffdfc, exc=0xfffffdfc) at object.c:2143
#10 0x0811d84b in mono_runtime_delegate_invoke (delegate=0x14bdf50, params=0xfffffdfc, exc=0xfffffdfc) at object.c:2679
#11 0x080ed495 in start_wrapper (data=0xb541ab60) at threads.c:627
#12 0x0813f182 in thread_start_routine (args=0x82baac4) at threads.c:279
#13 0x081641f4 in GC_start_routine (arg=0xfffffdfc) at pthread_support.c:1382
#14 0xb7e684fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb7dc5e5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb44ffb90 (LWP 19511)):
#0  0xb7f55410 in __kernel_vsyscall ()
#1  0xb7e6cdd2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081535af in timedwait_signal_poll_cond (cond=0x82baeb4, mutex=0x82bae9c, timeout=0x0, alertable=1) at handles.c:1502
#3  0x081536e0 in _wapi_handle_timedwait_signal_handle (handle=0x418, timeout=0x0, alertable=128) at handles.c:1572
#4  0x0815384a in _wapi_handle_wait_signal_handle (handle=0xfffffdfc, alertable=-516) at handles.c:1532
#5  0x0813ca01 in WaitForSingleObjectEx (handle=0x418, timeout=4294967295, alertable=1) at wait.c:205
#6  0x080e9d20 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=0xff0e10, handle=0xfffffdfc, ms=-516, exitContext=0) at threads.c:1449
#7  0xb4828d4a in ?? ()
#8  0xb4828a53 in ?? ()
#9  0xb48287b0 in ?? ()
#10 0xb482873d in ?? ()
#11 0xb48286e2 in ?? ()
#12 0xb4827ef8 in ?? ()
#13 0xb4827e6b in ?? ()
#14 0xb4827df5 in ?? ()
#15 0xb48279f6 in ?? ()
#16 0xb48277a1 in ?? ()
#17 0xb4827650 in ?? ()
#18 0xb482759b in ?? ()
#19 0xb4873ba6 in ?? ()
#20 0xb63647e3 in ?? ()
#21 0xb466efaf in ?? ()
#22 0xb46650a2 in ?? ()
#23 0xb6688619 in ?? ()
#24 0x0819fb19 in mono_jit_runtime_invoke (method=0xff0e28, obj=0x14882d8, params=0xfffffdfc, exc=0xfffffdfc) at mini.c:13182
#25 0x0811d3e7 in mono_runtime_invoke (method=0xfffffdfc, obj=0xfffffdfc, params=0xfffffdfc, exc=0xfffffdfc) at object.c:2143
#26 0x0811d84b in mono_runtime_delegate_invoke (delegate=0x14882d8, params=0xfffffdfc, exc=0xfffffdfc) at object.c:2679
#27 0x080ed495 in start_wrapper (data=0xb475d538) at threads.c:627
#28 0x0813f182 in thread_start_routine (args=0x82babcc) at threads.c:279
#29 0x081641f4 in GC_start_routine (arg=0xfffffdfc) at pthread_support.c:1382
#30 0xb7e684fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#31 0xb7dc5e5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7cad960 (LWP 19502)):
#0  0xb7f55410 in __kernel_vsyscall ()
#1  0xb7e6f99b in read () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0806d6bf in mono_handle_native_sigsegv (signal=6, ctx=0xbfb4d5dc) at mini-exceptions.c:1327
#3  <signal handler called>
#4  0xb7f55410 in __kernel_vsyscall ()
#5  0xb7d1a085 in raise () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7d1ba01 in abort () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7eca1fa in g_logv () from /usr/lib/libglib-2.0.so.0
#8  0xb7eca239 in g_log () from /usr/lib/libglib-2.0.so.0
#9  0x080f124c in mono_type_to_ldind (type=0xb3d12074) at marshal.c:1421
#10 0x08175b69 in mini_type_to_ldind (cfg=<value optimized out>, type=0x4c2e) at mini.c:1761
#11 0x081869f6 in mono_method_to_ir (cfg=0xb3b64888, method=0xb3b65628, start_bblock=0xb3b67054, end_bblock=0xb3b670ec, locals_offset=2, return_var=0x0, dont_inline=0xb3b65110, inline_args=0x0, inline_offset=0, is_virtual_call=0) at mini.c:7548
#12 0x0819ceb0 in mini_method_compile (method=0xb3b65628, opts=30501375, domain=0x34ee0, run_cctors=<value optimized out>, compile_aot=<value optimized out>, parts=0) at mini.c:12292
#13 0x0819f0c6 in mono_jit_compile_method (method=0xb3b65628) at mini.c:12836
#14 0x0811d688 in mono_compile_method (method=0x0) at object.c:528
#15 0x080709ca in mono_magic_trampoline (regs=0xbfb4e6a8, code=0xb434ace1 "\203?\b\213??\030??", m=0xb3b65628, tramp=0x0) at mini-trampolines.c:249
#16 0xb7b7d066 in ?? ()
#17 0xb78ca1ae in ?? ()
#18 0x0819fb19 in mono_jit_runtime_invoke (method=0x119c700, obj=0x0, params=0x0, exc=0x0) at mini.c:13182
#19 0x0811d3e7 in mono_runtime_invoke (method=0x0, obj=0x0, params=0x0, exc=0x0) at object.c:2143
#20 0x081239b6 in mono_runtime_invoke_array (method=0xb3b6f5a4, obj=0x0, params=0x160a0a0, exc=0x0) at object.c:3228
#21 0x08115ac4 in ves_icall_InternalInvoke (method=0x0, this=0x0, params=0x160a0a0, exc=0xbfb4e86c) at icall.c:3016
#22 0xb663a870 in ?? ()
#23 0xb663a0c7 in ?? ()
#24 0xb6638122 in ?? ()
#25 0xb55fecbe in ?? ()
#26 0xb6637c8c in ?? ()
#27 0xb55fe9c4 in ?? ()
#28 0xb55fe886 in ?? ()
#29 0xb55fe84c in ?? ()
#30 0xb55fe7b6 in ?? ()
#31 0xb55fe739 in ?? ()
#32 0xb55fe6fc in ?? ()
#33 0xb63668e1 in ?? ()
#34 0xb6364c81 in ?? ()
#35 0xb3ed3418 in ?? ()
#36 0xb482cee2 in ?? ()
#37 0xb4829817 in ?? ()
#38 0xb48297ed in ?? ()
#39 0xb4829770 in ?? ()
#40 0xb6688619 in ?? ()
#41 0x0819fb19 in mono_jit_runtime_invoke (method=0x118, obj=0xff0e40, params=0x0, exc=0x0) at mini.c:13182
#42 0x0811d3e7 in mono_runtime_invoke (method=0x0, obj=0x0, params=0x0, exc=0x0) at object.c:2143
#43 0x081239b6 in mono_runtime_invoke_array (method=0x8932648, obj=0xff0e40, params=0x0, exc=0x0) at object.c:3228
#44 0x08115ac4 in ves_icall_InternalInvoke (method=0x0, this=0xff0e40, params=0x0, exc=0xbfb4efa4) at icall.c:3016
#45 0xb663a870 in ?? ()
#46 0xb663a0c7 in ?? ()
#47 0xb504b24b in ?? ()
#48 0xb48296e9 in ?? ()
#49 0xb4829563 in ?? ()
#50 0xb482952f in ?? ()
#51 0xb48294e3 in ?? ()
#52 0xb48290ba in ?? ()
#53 0xb4828f42 in ?? ()
#54 0xb4828e4d in ?? ()
#55 0xb466a04b in ?? ()
#56 0xb466665a in ?? ()
#57 0xb46660a7 in ?? ()
#58 0xb466539b in ?? ()
#59 0xb4664c5e in ?? ()
#60 0xb4664bbf in ?? ()
#61 0xb46648d0 in ?? ()
#62 0xb6364692 in ?? ()
#63 0xb78cd861 in ?? ()
#64 0xb78ca1ae in ?? ()
#65 0x0819fb19 in mono_jit_runtime_invoke (method=0x5add8, obj=0x0, params=0x0, exc=0x0) at mini.c:13182
#66 0x0811d3e7 in mono_runtime_invoke (method=0x0, obj=0x0, params=0x0, exc=0x0) at object.c:2143
#67 0x081219f4 in mono_runtime_exec_main (method=0x829e144, args=0x3be70, exc=0x0) at object.c:3039
#68 0x08121f36 in mono_runtime_run_main (method=0x829e144, argc=0, argv=0xbfb504ec, exc=0x0) at object.c:2825
#69 0x08059fdb in mono_main (argc=1, argv=0xbfb504e4) at driver.c:942
#70 0x08058fce in main (argc=0, argv=0x0) at main.c:30
#0  0xb7f55410 in __kernel_vsyscall ()

=================================================================
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



More information about the Mono-devel-list mailing list