Bug 57301 - Running IronPython's executable under Mono 5.0.x causes a SIGSEGV on exit, this did not happen on 4.8
Summary: Running IronPython's executable under Mono 5.0.x causes a SIGSEGV on exit, th...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 5.0 (2017-02)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2017-06-08 23:24 UTC by Alex Earl
Modified: 2017-07-05 21:31 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: Yes
Last known good build:


Attachments
IronPython built with mono 5 (5.14 MB, application/octet-stream)
2017-06-20 19:54 UTC, Alex Earl
Details


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 Alex Earl 2017-06-08 23:24:57 UTC
After building IronPython's ipy.exe with 5.0.x, when I try to run it, I get the following exception on exit. My theory is that some of the weakref objects are having their cleanup callbacks called when their C# WeakRef object is finalized. The finalizer for WeakRefTracker will try and call a Python method for cleanup, which requires creating a dynamic method to do so.

I will try and upload a zip with the binaries if desired.

Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:19:18 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen (concurrent by default)


Here is the error message:

USER@USER-mate:~/Projects/ironpython2$ mono ./bin/Debug/ipy.exe 
IronPython 2.7.8a1 DEBUG (2.7.0.0) on Mono 4.0.30319.42000 (64-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import System
>>> ^D
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Delegate.CreateDelegate_internal (System.Type,object,System.Reflection.MethodInfo,bool) [0x00000] in <a07d6bf484a54da2861691df910339b1>:0
  at System.Delegate.CreateDelegate (System.Type,object,System.Reflection.MethodInfo,bool,bool) [0x002f0] in <a07d6bf484a54da2861691df910339b1>:0
  at System.Delegate.CreateDelegate (System.Type,object,System.Reflection.MethodInfo) [0x00000] in <a07d6bf484a54da2861691df910339b1>:0
  at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type,object) [0x0001a] in <a07d6bf484a54da2861691df910339b1>:0
  at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate () [0x00022] in <26aedeede9534b948c539f8734c8492d>:0
  at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression) [0x00013] in <26aedeede9534b948c539f8734c8492d>:0
  at System.Linq.Expressions.Expression`1<TDelegate_REF>.Compile (bool) [0x00000] in <26aedeede9534b948c539f8734c8492d>:0
  at System.Linq.Expressions.Expression`1<TDelegate_REF>.Compile () [0x00000] in <26aedeede9534b948c539f8734c8492d>:0
  at System.Runtime.CompilerServices.CallSiteBinder.BindCore<T_REF> (System.Runtime.CompilerServices.CallSite`1<T_REF>,object[]) [0x0003b] in <26aedeede9534b948c539f8734c8492d>:0
  at System.Dynamic.UpdateDelegates.UpdateAndExecute1<object, bool> (System.Runtime.CompilerServices.CallSite,object) [0x000f1] in <26aedeede9534b948c539f8734c8492d>:0
  at IronPython.Runtime.Binding.PythonConversionBinder.BoolConversion (System.Runtime.CompilerServices.CallSite,object) [0x00030] in <c279e901ea324b8982762291be036458>:0
  at IronPython.Runtime.Converter.ConvertToBoolean (object) [0x00001] in <c279e901ea324b8982762291be036458>:0
  at IronPython.Compiler.Ast.DynamicConvertExpression/BooleanConversionInstruction.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x00008] in <c279e901ea324b8982762291be036458>:0
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x0001b] in <590c4d4a094344dab0d1142f4103019e>:0
  at Microsoft.Scripting.Interpreter.LightLambda.Run3<T0_REF, T1_REF, T2_REF, TRet_REF> (T0_REF,T1_REF,T2_REF) [0x00066] in <590c4d4a094344dab0d1142f4103019e>:0
  at IronPython.Compiler.PythonCallTargets.OriginalCallTarget2 (IronPython.Runtime.PythonFunction,object,object) [0x00014] in <c279e901ea324b8982762291be036458>:0
  at Microsoft.Scripting.Interpreter.FuncCallInstruction`5<T0_REF, T1_REF, T2_REF, T3_REF, TRet_REF>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x00001] in <590c4d4a094344dab0d1142f4103019e>:0
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x0001b] in <590c4d4a094344dab0d1142f4103019e>:0
  at Microsoft.Scripting.Interpreter.LightLambda.Run4<T0_REF, T1_REF, T2_REF, T3_REF, TRet_REF> (T0_REF,T1_REF,T2_REF,T3_REF) [0x00077] in <590c4d4a094344dab0d1142f4103019e>:0
  at System.Dynamic.UpdateDelegates.UpdateAndExecute3<T0_REF, T1_REF, T2_REF, TRet_REF> (System.Runtime.CompilerServices.CallSite,T0_REF,T1_REF,T2_REF) [0x0011a] in <26aedeede9534b948c539f8734c8492d>:0
  at (wrapper delegate-invoke) <Module>.invoke_callvirt_object_Func`5<CallSite, CodeContext, object, object[], object>_CallSite_CodeContext_object_object[] (System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object[], object>,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object[]) [0x00048] in <a07d6bf484a54da2861691df910339b1>:0
  at Microsoft.Scripting.Interpreter.FuncCallInstruction`6<T0_REF, T1_REF, T2_REF, T3_REF, T4_REF, TRet_REF>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x00001] in <590c4d4a094344dab0d1142f4103019e>:0
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) [0x0001b] in <590c4d4a094344dab0d1142f4103019e>:0
  at Microsoft.Scripting.Interpreter.LightLambda.Run4<T0_REF, T1_REF, T2_REF, T3_REF, TRet_REF> (T0_REF,T1_REF,T2_REF,T3_REF) [0x00077] in <590c4d4a094344dab0d1142f4103019e>:0
  at IronPython.Runtime.PythonContext.CallSplat (object,object[]) [0x0001f] in <c279e901ea324b8982762291be036458>:0
  at IronPython.Runtime.Operations.PythonCalls.Call (object,object[]) [0x00006] in <c279e901ea324b8982762291be036458>:0
  at IronPython.Runtime.WeakRefTracker.Finalize () [0x00076] in <c279e901ea324b8982762291be036458>:0
  at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) [0x0001e] in <a07d6bf484a54da2861691df910339b1>:0
/proc/self/maps:
00400000-007b1000 r-xp 00000000 08:01 429498                             /usr/bin/mono-sgen
009b0000-009b1000 r--p 003b0000 08:01 429498                             /usr/bin/mono-sgen
009b1000-009b4000 rw-p 003b1000 08:01 429498                             /usr/bin/mono-sgen
009b4000-009e7000 rw-p 00000000 00:00 0 
01621000-02c0c000 rw-p 00000000 00:00 0                                  [heap]
40779000-40789000 rwxp 00000000 00:00 0 
40cb7000-40f07000 rwxp 00000000 00:00 0 
7fcc34000000-7fcc340c0000 rw-p 00000000 00:00 0 
7fcc340c0000-7fcc38000000 ---p 00000000 00:00 0 
7fcc3c000000-7fcc3c021000 rw-p 00000000 00:00 0 
7fcc3c021000-7fcc40000000 ---p 00000000 00:00 0 
7fcc40000000-7fcc40092000 rw-p 00000000 00:00 0 
7fcc40092000-7fcc44000000 ---p 00000000 00:00 0 
7fcc44000000-7fcc44062000 rw-p 00000000 00:00 0 
7fcc44062000-7fcc48000000 ---p 00000000 00:00 0 
7fcc48a98000-7fcc48b18000 rw-p 00000000 00:00 0 
7fcc48b1c000-7fcc48b9c000 rw-p 00000000 00:00 0 
7fcc48ba0000-7fcc48c20000 rw-p 00000000 00:00 0 
7fcc48c24000-7fcc48ca4000 rw-p 00000000 00:00 0 
7fcc48ca8000-7fcc48d28000 rw-p 00000000 00:00 0 
7fcc48d2c000-7fcc48dac000 rw-p 00000000 00:00 0 
7fcc48db0000-7fcc48e30000 rw-p 00000000 00:00 0 
7fcc48e34000-7fcc48eb4000 rw-p 00000000 00:00 0 
7fcc48eb8000-7fcc48f38000 rw-p 00000000 00:00 0 
7fcc48f3b000-7fcc48f3c000 ---p 00000000 00:00 0 
7fcc48f3c000-7fcc491bc000 rw-p 00000000 00:00 0 
7fcc491c0000-7fcc49240000 rw-p 00000000 00:00 0 
7fcc49242000-7fcc492c6000 rw-p 00000000 00:00 0 
7fcc492c6000-7fcc492c7000 ---p 00000000 00:00 0 
7fcc492c7000-7fcc494c7000 rw-p 00000000 00:00 0 
7fcc494c7000-7fcc494c8000 ---p 00000000 00:00 0 
7fcc494c8000-7fcc49748000 rw-p 00000000 00:00 0 
7fcc49749000-7fcc4980e000 r--p 00000000 08:01 1052515                    /home/USER/Projects/ironpython2/bin/Debug/DLLs/IronPython.SQLite.dll
7fcc4980e000-7fcc49a00000 r--p 00000000 08:01 1052486                    /home/USER/Projects/ironpython2/bin/Debug/IronPython.dll
7fcc49a00000-7fcc49b00000 rw-p 00000000 00:00 0 
7fcc49b13000-7fcc49b14000 rw-p 00000000 00:00 0 
7fcc49b18000-7fcc49b23000 rw-p 00000000 00:00 0 
7fcc49b23000-7fcc49b33000 rwxp 00000000 00:00 0 
7fcc49b33000-7fcc49b35000 rw-p 00000000 00:00 0 
7fcc49b36000-7fcc49b3c000 rw-p 00000000 00:00 0 
7fcc49b3d000-7fcc49b3e000 rw-p 00000000 00:00 0 
7fcc49b3e000-7fcc49b4e000 rwxp 00000000 00:00 0 
7fcc49b4e000-7fcc49b5f000 rw-p 00000000 00:00 0 
7fcc49b60000-7fcc49b62000 rw-p 00000000 00:00 0 
7fcc49b62000-7fcc49b65000 rw-p 00000000 00:00 0 
7fcc49b65000-7fcc49e68000 r--p 00000000 08:01 429457                     /usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
7fcc49e68000-7fcc4a0f3000 r--p 00000000 08:01 429442                     /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
7fcc4a0f3000-7fcc4a1ea000 r--p 00000000 08:01 430287                     /usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
7fcc4a1ea000-7fcc4a30f000 r--p 00000000 08:01 1052462                    /home/USER/Projects/ironpython2/bin/Debug/Microsoft.Dynamic.dll
7fcc4a30f000-7fcc4a318000 ---p 00000000 00:00 0 
7fcc4a318000-7fcc4a510000 rw-p 00000000 00:00 0 
7fcc4a510000-7fcc4aa38000 r-xp 00000000 08:01 265130                     /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so
7fcc4aa38000-7fcc4ac37000 ---p 00528000 08:01 265130                     /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so
7fcc4ac37000-7fcc4ac38000 r--p 00527000 08:01 265130                     /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so
7fcc4ac38000-7fcc4ac39000 rw-p 00528000 08:01 265130                     /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so
7fcc4ac39000-7fcc4ac56000 rw-p 00000000 00:00 0 
7fcc4ac56000-7fcc4afff000 r--p 00000000 08:01 430550                     /usr/lib/mono/4.5/mscorlib.dll
7fcc4afff000-7fcc4bfff000 rw-p 00000000 00:00 0 
7fcc4bfff000-7fcc4c000000 ---p 00000000 00:00 0 
7fcc4c000000-7fcc4cc01000 rw-p 00000000 00:00 0 
7fcc4cc01000-7fcc4cc03000 rw-p 00000000 00:00 0 
7fcc4cc04000-7fcc4ccc3000 r--p 00000000 08:01 1052489                    /home/USER/Projects/ironpython2/bin/Debug/IronPython.Modules.dll
7fcc4ccc3000-7fcc4ccda000 r--p 00000000 08:01 430350                     /usr/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
7fcc4ccda000-7fcc4d6a1000 r--p 00000000 08:01 400439                     /usr/lib/locale/locale-archive
7fcc4d6a1000-7fcc4d85e000 r-xp 00000000 08:01 1054227                    /lib/x86_64-linux-gnu/libc-2.24.so
7fcc4d85e000-7fcc4da5e000 ---p 001bd000 08:01 1054227                    /lib/x86_64-linux-gnu/libc-2.24.so
7fcc4da5e000-7fcc4da62000 r--p 001bd000 08:01 1054227                    /lib/x86_64-linux-gnu/libc-2.24.so
7fcc4da62000-7fcc4da64000 rw-p 001c1000 08:01 1054227                    /lib/x86_64-linux-gnu/libc-2.24.so
7fcc4da64000-7fcc4da68000 rw-p 00000000 00:00 0 
7fcc4da68000-7fcc4da7e000 r-xp 00000000 08:01 1054265                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fcc4da7e000-7fcc4dc7d000 ---p 00016000 08:01 1054265                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fcc4dc7d000-7fcc4dc7e000 r--p 00015000 08:01 1054265                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fcc4dc7e000-7fcc4dc7f000 rw-p 00016000 08:01 1054265                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fcc4dc7f000-7fcc4dc97000 r-xp 00000000 08:01 1054366                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7fcc4dc97000-7fcc4de97000 ---p 00018000 08:01 1054366                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7fcc4de97000-7fcc4de98000 r--p 00018000 08:01 1054366                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7fcc4de98000-7fcc4de99000 rw-p 00019000 08:01 1054366                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7fcc4de99000-7fcc4de9d000 rw-p 00000000 00:00 0 
7fcc4de9d000-7fcc4dea0000 r-xp 00000000 08:01 1054251                    /lib/x86_64-linux-gnu/libdl-2.24.so
7fcc4dea0000-7fcc4e09f000 ---p 00003000 08:01 1054251                    /lib/x86_64-linux-gnu/libdl-2.24.so
7fcc4e09f000-7fcc4e0a0000 r--p 00002000 08:01 1054251                    /lib/x86_64-linux-gnu/libdl-2.24.so
7fcc4e0a0000-7fcc4e0a1000 rw-p 00003000 08:01 1054251                    /lib/x86_64-linux-gnu/libdl-2.24.so
7fcc4e0a1000-7fcc4e0a8000 r-xp 00000000 08:01 1054374                    /lib/x86_64-linux-gnu/librt-2.24.so
7fcc4e0a8000-7fcc4e2a7000 ---p 00007000 08:01 1054374                    /lib/x86_64-linux-gnu/librt-2.24.so
7fcc4e2a7000-7fcc4e2a8000 r--p 00006000 08:01 1054374                    /lib/x86_64-linux-gnu/librt-2.24.so
7fcc4e2a8000-7fcc4e2a9000 rw-p 00007000 08:01 1054374                    /lib/x86_64-linux-gnu/librt-2.24.so
7fcc4e2a9000-7fcc4e3b1000 r-xp 00000000 08:01 1054293                    /lib/x86_64-linux-gnu/libm-2.24.so
7fcc4e3b1000-7fcc4e5b0000 ---p 00108000 08:01 1054293                    /lib/x86_64-linux-gnu/libm-2.24.so
7fcc4e5b0000-7fcc4e5b1000 r--p 00107000 08:01 1054293                    /lib/x86_64-linux-gnu/libm-2.24.so
7fcc4e5b1000-7fcc4e5b2000 rw-p 00108000 08:01 1054293                    /lib/x86_64-linux-gnu/libm-2.24.so
7fcc4e5b2000-7fcc4e5d7000 r-xp 00000000 08:01 1054199                    /lib/x86_64-linux-gnu/ld-2.24.so
7fcc4e5d7000-7fcc4e5db000 rw-p 00000000 00:00 0 
7fcc4e5db000-7fcc4e5dd000 r--p 00000000 08:01 1052499                    /home/USER/Projects/ironpython2/bin/Debug/DLLs/IronPython.Wpf.dll
7fcc4e5dd000-7fcc4e62a000 r--p 00000000 08:01 430739                     /usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
7fcc4e62a000-7fcc4e648000 r--p 00000000 08:01 429435                     /usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
7fcc4e648000-7fcc4e66f000 r--p 00000000 08:01 1052463                    /home/USER/Projects/ironpython2/bin/Debug/Microsoft.Scripting.dll
7fcc4e66f000-7fcc4e758000 rw-p 00000000 00:00 0 
7fcc4e758000-7fcc4e7b7000 ---p 00000000 00:00 0 
7fcc4e7b7000-7fcc4e7be000 rw-p 00000000 00:00 0 
7fcc4e7be000-7fcc4e7c3000 rw-p 00000000 00:00 0 
7fcc4e7c3000-7fcc4e7c8000 r--p 00000000 08:01 1052501                    /home/USER/Projects/ironpython2/bin/Debug/ipy.exe
7fcc4e7c8000-7fcc4e7d3000 rw-p 00000000 00:00 0 
7fcc4e7d3000-7fcc4e7d4000 rw-s 00000000 00:14 28402                      /dev/shm/mono.4771
7fcc4e7d4000-7fcc4e7d7000 rw-p 00000000 00:00 0 
7fcc4e7d7000-7fcc4e7d8000 r--p 00025000 08:01 1054199                    /lib/x86_64-linux-gnu/ld-2.24.so
7fcc4e7d8000-7fcc4e7d9000 rw-p 00026000 08:01 1054199                    /lib/x86_64-linux-gnu/ld-2.24.so
7fcc4e7d9000-7fcc4e7da000 rw-p 00000000 00:00 0 
7ffebd4c4000-7ffebd4cc000 ---p 00000000 00:00 0 
7ffebdca2000-7ffebdcc3000 rw-p 00000000 00:00 0                          [stack]
7ffebdde8000-7ffebddea000 r--p 00000000 00:00 0                          [vvar]
7ffebddea000-7ffebddec000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Native stacktrace:

	mono() [0x4ac59f]
	mono() [0x50fac6]
	mono(mono_method_signature_checked+0x2c) [0x574afc]

Debug info from gdb:

[New LWP 4772]
[New LWP 4773]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fcc4dc8ebf0 in futex_abstimed_wait_cancelable (private=0, abstime=0x7ffebdcc0600, expected=0, futex_word=0x2bcbb60) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
205	../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7fcc4e7b7740 (LWP 4771) "mono" 0x00007fcc4dc8ebf0 in futex_abstimed_wait_cancelable (private=0, abstime=0x7ffebdcc0600, expected=0, futex_word=0x2bcbb60) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  2    Thread 0x7fcc4c7ff700 (LWP 4772) "SGen worker" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7fcc4a50f700 (LWP 4773) "Finalizer" 0x00007fcc4dc9008a in __waitpid (pid=4777, stat_loc=0x7fcc4a50d29c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29

Thread 3 (Thread 0x7fcc4a50f700 (LWP 4773)):
#0  0x00007fcc4dc9008a in __waitpid (pid=4777, stat_loc=0x7fcc4a50d29c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004ac659 in ?? ()
#2  0x000000000050fac6 in ?? ()
#3  0x0000000000574afc in mono_method_signature_checked ()
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fcc4c7ff700 (LWP 4772)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000000000066b537 in ?? ()
#2  0x00007fcc4dc866da in start_thread (arg=0x7fcc4c7ff700) at pthread_create.c:456
#3  0x00007fcc4d7a917f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 1 (Thread 0x7fcc4e7b7740 (LWP 4771)):
#0  0x00007fcc4dc8ebf0 in futex_abstimed_wait_cancelable (private=0, abstime=0x7ffebdcc0600, expected=0, futex_word=0x2bcbb60) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x2bcbb60, abstime=abstime@entry=0x7ffebdcc0600) at sem_waitcommon.c:111
#2  0x00007fcc4dc8ecbf in __new_sem_wait_slow (sem=0x2bcbb60, abstime=0x7ffebdcc0600) at sem_waitcommon.c:181
#3  0x00007fcc4dc8ed72 in sem_timedwait (sem=<optimized out>, abstime=<optimized out>) at sem_timedwait.c:36
#4  0x00000000005eccd9 in mono_domain_finalize ()
#5  0x0000000000423214 in ?? ()
#6  0x000000000047d4bf in mono_main ()
#7  0x0000000000420bce in ?? ()
#8  0x00007fcc4d6c13f1 in __libc_start_main (main=0x420ad0, argc=2, argv=0x7ffebdcc09a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffebdcc0998) at ../csu/libc-start.c:291
#9  0x0000000000421189 in _start ()

=================================================================
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 (core dumped)
Comment 1 Zoltan Varga 2017-06-10 00:58:56 UTC
How can I reproduce this ?
Comment 2 Zoltan Varga 2017-06-10 01:04:15 UTC
Can't reproduce this using:

nuget install IronPython

MONO_PATH=DynamicLanguageRuntime.1.1.2/lib/Net45:IronPython.2.7.7/lib/Net45/ /Library/Frameworks/Mono.framework/Versions/Current/bin/mono64 IronPython.2.7.7/tools/ipy.exe
Comment 3 Alex Earl 2017-06-18 15:10:29 UTC
You would also need the stdlib. There are modules in the stdlib that create weakref's that have callbacks for finalization, this is where the issue arises.
Comment 4 Zoltan Varga 2017-06-18 16:26:39 UTC
How do i reproduce this ?
Comment 5 Alex Earl 2017-06-18 22:40:02 UTC
I will write up full steps tomorrow.
Comment 6 Rodrigo Kumpera 2017-06-19 15:46:36 UTC
Please update the bug with repro steps.
Comment 7 Alex Earl 2017-06-20 19:54:29 UTC
Created attachment 23018 [details]
IronPython built with mono 5

Unpack the archive, then run "mono ipy.exe". You don't have to enter any commands, just exit via Ctrl+D. This shows the issue.
Comment 8 Zoltan Varga 2017-06-20 21:16:15 UTC
I can reproduce with those binaries.
Comment 9 Zoltan Varga 2017-06-20 21:55:20 UTC
https://github.com/mono/mono/pull/5081

Thanks for the testcase.
Comment 10 Zoltan Varga 2017-07-05 21:24:37 UTC
Fixed in mono master/2017-06.