Bug 16379 - Segmentation fault when running xUnit.NET
Summary: Segmentation fault when running xUnit.NET
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-11-21 04:37 UTC by June Rhodes
Modified: 2014-01-31 02:21 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 June Rhodes 2013-11-21 04:37:46 UTC
I managed to capture this stack trace while running xUnit.NET runner under valgrind.  It's most likely a duplicate of 15969, but I wanted to report it in case it is a different issue.  I'm going to attempt to upgrade Mono to after 79e0856ffda4c2566314ba31677fe55f2d7f53f2 and will close this issue if it's not reproducable after that point.

Here is the valgrind trace:

==22524== Memcheck, a memory error detector
==22524== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==22524== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==22524== Command: /usr/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll /xml Tychaia.Threading.Tests.results.xml
==22524== 
xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2007-11 Microsoft Corporation.

xunit.dll:     Version 1.9.1.1600
Test assembly: /home/james/Projects/Redpoint/Tychaia/Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll

Tests complete: 6 of 9==22524== Thread 3:
==22524== Conditional jump or move depends on uninitialised value(s)
==22524==    at 0x5CB2A6: conservatively_pin_objects_from (sgen-gc.c:1476)
==22524==    by 0x5CB51D: scan_thread_data (sgen-gc.c:4022)
==22524==    by 0x5D3CD6: collect_nursery (sgen-gc.c:2566)
==22524==    by 0x5D47E7: sgen_perform_collection (sgen-gc.c:3445)
==22524==    by 0x5EAB69: mono_gc_alloc_obj_nolock (sgen-alloc.c:288)
==22524==    by 0x5EAD7A: mono_gc_alloc_vector (sgen-alloc.c:491)
==22524==    by 0x5F68E8F: ???
==22524==    by 0x9E18041: ???
==22524==    by 0xA22DB9A: ???
==22524==    by 0xA25971B: ???
==22524==    by 0xA25914F: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524== 
9 total, 0 failed, 0 skipped, took 8.318 seconds
==22524== Thread 182:
==22524== Invalid write of size 8
==22524==    at 0x504600: handle_signal_exception (exceptions-amd64.c:758)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9aa08 is on thread 182's stack
==22524== 
==22524== Invalid write of size 8
==22524==    at 0x504605: handle_signal_exception (exceptions-amd64.c:758)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9aa10 is on thread 182's stack
==22524== 
==22524== Invalid write of size 8
==22524==    at 0x50460D: handle_signal_exception (exceptions-amd64.c:758)
==22524==    by 0x27182817: ???
==22524==    by 0x419: ???
==22524==    by 0x619F92: _wapi_thread_apc_pending (wthreads.c:885)
==22524==    by 0xA49F4C6: ???
==22524==    by 0x9A0630F: ???
==22524==    by 0x5F8C58F: ???
==22524==    by 0x1F: ???
==22524==    by 0x585CF8: mono_thread_clr_state (threads.c:4462)
==22524==  Address 0x20d9aa00 is on thread 182's stack
==22524== 
==22524== Invalid write of size 8
==22524==    at 0x50463E: handle_signal_exception (string3.h:51)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x4AE85F: mono_handle_exception_internal.constprop.12 (string3.h:51)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x4AEDBC: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1576)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x4AE89D: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1647)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x4AC291: mono_find_jit_info_ext (mini-exceptions.c:357)
==22524==    by 0x4AEC01: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1666)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a9f0 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x504B85: mono_arch_find_jit_info (exceptions-amd64.c:604)
==22524==    by 0x4AC360: mono_find_jit_info_ext (mini-exceptions.c:376)
==22524==    by 0x4AEC01: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1666)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==  Address 0x20d9a9f0 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x504BF8: mono_arch_find_jit_info (exceptions-amd64.c:609)
==22524==    by 0x4AC360: mono_find_jit_info_ext (mini-exceptions.c:376)
==22524==    by 0x4AEC01: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1666)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid write of size 8
==22524==    at 0x4AEBBB: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1847)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a998 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x4AE976: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1707)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==    by 0x427717: mono_jit_runtime_invoke (mini.c:6473)
==22524==    by 0x5AABBA: mono_runtime_invoke (object.c:2827)
==22524==    by 0x5865F8: start_wrapper (threads.c:614)
==22524==    by 0x61AE00: thread_start_routine (wthreads.c:294)
==22524==    by 0x62AD2F: inner_start_thread (mono-threads-posix.c:49)
==22524==    by 0x5544E0E: start_thread (pthread_create.c:308)
==22524==    by 0x584244C: clone (clone.S:113)
==22524==  Address 0x20d9a9f0 is on thread 182's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0xA6E2B98: uw_update_context (unwind-dw2.c:216)
==22524==    by 0xA6E3D32: _Unwind_ForcedUnwind_Phase2 (unwind-dw2.c:1463)
==22524==    by 0xA6E4141: _Unwind_ForcedUnwind (unwind.inc:207)
==22524==    by 0x554AF3F: __pthread_unwind (unwind.c:129)
==22524==    by 0x5545EC4: pthread_exit (pthreadP.h:264)
==22524==    by 0x5D18D0: mono_gc_pthread_exit (sgen-gc.c:4259)
==22524==    by 0x61AEB5: ExitThread (wthreads.c:214)
==22524==    by 0x583F09: mono_thread_exit (threads.c:1076)
==22524==    by 0x4AED09: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1680)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==  Address 0x20d9aa18 is on thread 182's stack
==22524== 
==22524== Invalid read of size 1
==22524==    at 0xA6E37A0: uw_frame_state_for (md-unwind-support.h:53)
==22524==    by 0xA6E3CCA: _Unwind_ForcedUnwind_Phase2 (unwind.inc:155)
==22524==    by 0xA6E4141: _Unwind_ForcedUnwind (unwind.inc:207)
==22524==    by 0x554AF3F: __pthread_unwind (unwind.c:129)
==22524==    by 0x5545EC4: pthread_exit (pthreadP.h:264)
==22524==    by 0x5D18D0: mono_gc_pthread_exit (sgen-gc.c:4259)
==22524==    by 0x61AEB5: ExitThread (wthreads.c:214)
==22524==    by 0x583F09: mono_thread_exit (threads.c:1076)
==22524==    by 0x4AED09: mono_handle_exception_internal.constprop.12 (mini-exceptions.c:1680)
==22524==    by 0x50467A: handle_signal_exception (exceptions-amd64.c:771)
==22524==    by 0x27182817: ???
==22524==    by 0xA4A6DDF: ???
==22524==  Address 0x27182818 is not stack'd, malloc'd or (recently) free'd
==22524== 

Native stacktrace:

==22524== Thread 191:
==22524== Invalid write of size 8
==22524==    at 0x50460D: handle_signal_exception (exceptions-amd64.c:758)
==22524==    by 0x27182817: ???
==22524==    by 0x469: ???
==22524==    by 0x619F92: _wapi_thread_apc_pending (wthreads.c:885)
==22524==    by 0xA49F4C6: ???
==22524==    by 0xA1B783F: ???
==22524==    by 0x5F8D34F: ???
==22524==    by 0x1F: ???
==22524==    by 0x585CF8: mono_thread_clr_state (threads.c:4462)
==22524==  Address 0x21fa3a00 is on thread 191's stack
==22524== 
==22524== Invalid read of size 8
==22524==    at 0x628C43: get_hazardous_pointer (hazard-pointer.c:180)
==22524==    by 0x59E77F: mono_jit_info_table_find_internal (domain.c:359)
==22524==    by 0x422A80: mono_sigsegv_signal_handler (mini.c:6560)
==22524==    by 0x554C1EF: ??? (in /lib64/libpthread-2.17.so)
==22524==    by 0xA6E379F: uw_frame_state_for (md-unwind-support.h:63)
==22524==    by 0xA6E3CCA: _Unwind_ForcedUnwind_Phase2 (unwind.inc:155)
==22524==    by 0xA6E4141: _Unwind_ForcedUnwind (unwind.inc:207)
==22524==    by 0x554AF3F: __pthread_unwind (unwind.c:129)
==22524==    by 0x5545EC4: pthread_exit (pthreadP.h:264)
==22524==    by 0x5D18D0: mono_gc_pthread_exit (sgen-gc.c:4259)
==22524==    by 0x61AEB5: ExitThread (wthreads.c:214)
==22524==    by 0x583F09: mono_thread_exit (threads.c:1076)
==22524==  Address 0x158 is not stack'd, malloc'd or (recently) free'd
==22524== 
==22524== 
==22524== Process terminating with default action of signal 11 (SIGSEGV)
==22524==  Access not within mapped region at address 0x158
==22524==    at 0x628C43: get_hazardous_pointer (hazard-pointer.c:180)
==22524==    by 0x59E77F: mono_jit_info_table_find_internal (domain.c:359)
==22524==    by 0x422A80: mono_sigsegv_signal_handler (mini.c:6560)
==22524==    by 0x554C1EF: ??? (in /lib64/libpthread-2.17.so)
==22524==    by 0xA6E379F: uw_frame_state_for (md-unwind-support.h:63)
==22524==    by 0xA6E3CCA: _Unwind_ForcedUnwind_Phase2 (unwind.inc:155)
==22524==    by 0xA6E4141: _Unwind_ForcedUnwind (unwind.inc:207)
==22524==    by 0x554AF3F: __pthread_unwind (unwind.c:129)
==22524==    by 0x5545EC4: pthread_exit (pthreadP.h:264)
==22524==    by 0x5D18D0: mono_gc_pthread_exit (sgen-gc.c:4259)
==22524==    by 0x61AEB5: ExitThread (wthreads.c:214)
==22524==    by 0x583F09: mono_thread_exit (threads.c:1076)
==22524==  If you believe this happened as a result of a stack
==22524==  overflow in your program's main thread (unlikely but
==22524==  possible), you can try to increase the size of the
==22524==  main thread stack using the --main-stacksize= flag.
==22524==  The main thread stack size used in this run was 8388608.
==22524== 
==22524== HEAP SUMMARY:
==22524==     in use at exit: 6,382,312 bytes in 50,800 blocks
==22524==   total heap usage: 433,130 allocs, 382,330 frees, 298,522,221 bytes allocated
==22524== 
==22524== LEAK SUMMARY:
==22524==    definitely lost: 154 bytes in 2 blocks
==22524==    indirectly lost: 0 bytes in 0 blocks
==22524==      possibly lost: 7,488 bytes in 26 blocks
==22524==    still reachable: 6,374,670 bytes in 50,772 blocks
==22524==         suppressed: 0 bytes in 0 blocks
==22524== Rerun with --leak-check=full to see details of leaked memory
==22524== 
==22524== For counts of detected and suppressed errors, rerun with: -v
==22524== Use --track-origins=yes to see where uninitialised values come from
==22524== ERROR SUMMARY: 582 errors from 17 contexts (suppressed: 2 from 2)
./test: line 12: 22524 Killed                  valgrind /usr/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe 'Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll' /xml 'Tychaia.Threading.Tests.results.xml'
Comment 1 June Rhodes 2013-11-21 07:22:00 UTC
On 3.2.7 master/658753c (latest HEAD), I get:

==27913== Memcheck, a memory error detector
==27913== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==27913== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==27913== Command: /usr/local/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll /xml Tychaia.Threading.Tests.results.xml
==27913== 
xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2007-11 Microsoft Corporation.

xunit.dll:     Version 1.9.1.1600
Test assembly: /home/james/Projects/Redpoint/Tychaia/Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll

Tests complete: 6 of 9==27913== Thread 3:
==27913== Conditional jump or move depends on uninitialised value(s)
==27913==    at 0x5CD0E6: conservatively_pin_objects_from (sgen-gc.c:1477)
==27913==    by 0x5CD366: scan_thread_data (sgen-gc.c:4038)
==27913==    by 0x5D5A9E: collect_nursery (sgen-gc.c:2585)
==27913==    by 0x5D6587: sgen_perform_collection (sgen-gc.c:3464)
==27913==    by 0x5EC789: mono_gc_alloc_obj_nolock (sgen-alloc.c:288)
==27913==    by 0x5ECA9C: mono_gc_alloc_obj (sgen-alloc.c:465)
==27913==    by 0x5F68D2C: ???
==27913==    by 0xA28276B: ???
==27913==    by 0x427EB7: mono_jit_runtime_invoke (mini.c:6593)
==27913==    by 0x5AD0DA: mono_runtime_invoke (object.c:2827)
==27913==    by 0x5B0495: mono_runtime_invoke_array (object.c:4268)
==27913==    by 0x53093B: ves_icall_InternalExecute (icall.c:2958)
==27913== 
9 total, 0 failed, 0 skipped, took 8.103 seconds
==27913== Thread 24 return signal frame corrupted.  Killing process.
==27913== 
==27913== Process terminating with default action of signal 11 (SIGSEGV)
==27913==  General Protection Fault
==27913==    at 0x554C1F7: ??? (in /lib64/libpthread-2.17.so)
==27913==    by 0x1D37EA87: ???
==27913==    by 0x61C3C3F: ???
==27913==    by 0x1D37EBDF: ???
==27913==    by 0xA258943: ???
==27913== 
==27913== HEAP SUMMARY:
==27913==     in use at exit: 6,347,147 bytes in 50,373 blocks
==27913==   total heap usage: 432,564 allocs, 382,191 frees, 298,171,310 bytes allocated
==27913== 
==27913== LEAK SUMMARY:
==27913==    definitely lost: 160 bytes in 2 blocks
==27913==    indirectly lost: 0 bytes in 0 blocks
==27913==      possibly lost: 11,808 bytes in 41 blocks
==27913==    still reachable: 6,335,179 bytes in 50,330 blocks
==27913==         suppressed: 0 bytes in 0 blocks
==27913== Rerun with --leak-check=full to see details of leaked memory
==27913== 
==27913== For counts of detected and suppressed errors, rerun with: -v
==27913== Use --track-origins=yes to see where uninitialised values come from
==27913== ERROR SUMMARY: 97 errors from 1 contexts (suppressed: 2 from 2)
./test: line 12: 27913 Killed                  valgrind /usr/local/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe 'Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll' /xml 'Tychaia.Threading.Tests.results.xml'

Full version information:

Mono Runtime Engine version 3.2.7 (master/658753c Thu 21 Nov 23:06:24 EST 2013)
Copyright (C) 2002-2013 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
Comment 2 Zoltan Varga 2013-12-06 13:15:40 UTC
Could you attach some kind of testcase ?
Comment 3 Rodrigo Kumpera 2013-12-06 14:56:15 UTC
Please provide a test case that reproduces the issue.
Comment 4 June Rhodes 2013-12-06 16:26:08 UTC
The code relevant for this bug can be built with:

> git clone git://github.com/hach-que/Tychaia.git
> cd Tychaia/
> git submodule update --init --recursive
> mono Protobuild.exe
> xbuild
> valgrind /usr/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll /xml Tychaia.Threading.Tests.results.xml

As with most threading issues, it's generally impossible to provide a small test case as the interactions between and across threads can drastically alter the reproducibility of the test (even between different runs you can get different results).
Comment 5 Zoltan Varga 2013-12-06 16:33:03 UTC
Does this crash without valgrind too ?
Comment 6 June Rhodes 2013-12-06 16:34:34 UTC
Yes, it does:

[master] james@james-laptop:~/Tychaia> /usr/bin/mono /home/james/Projects/Redpoint/Tychaia/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll /xml Tychaia.Threading.Tests.results.xml
xUnit.net console test runner (64-bit .NET 4.0.30319.17020)
Copyright (C) 2007-11 Microsoft Corporation.

xunit.dll:     Version 1.9.1.1600
Test assembly: /home/james/Tychaia/Tychaia.Threading.Tests/bin/Debug/Tychaia.Threading.Tests.dll

9 total, 0 failed, 0 skipped, took 3.963 seconds

Native stacktrace:

Segmentation fault
Comment 7 Rodrigo Kumpera 2013-12-10 16:58:37 UTC
Does this happen with the same thing as #15969 or it's something else?
Comment 8 June Rhodes 2013-12-10 17:00:19 UTC
I replicated this issue on a version of Mono after 79e0856ffda4c2566314ba31677fe55f2d7f53f2, so whatever fix was made for 15969 did not fix this problem.
Comment 9 Rodrigo Kumpera 2013-12-10 17:18:25 UTC
This is glibc doing stupid things during pthread_exit, so it only affects linux with glibc.
Comment 10 Rodrigo Kumpera 2014-01-08 21:07:52 UTC
Does it crash if you set the envvar MONO_DEBUG to "dont-free-domains"?
Comment 11 Zoltan Varga 2014-01-31 01:59:29 UTC
Hopefully fixed by mono 2468027212c7620cf97f4d0b7ef488d32ba954f9.
Comment 12 June Rhodes 2014-01-31 02:21:36 UTC
I'll retest tonight to confirm.