Bug 41941 - Thread Abort Exceptions not caught in mono/tests test on bitcode
Summary: Thread Abort Exceptions not caught in mono/tests test on bitcode
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 4.5.X
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexander Kyte
Depends on:
Reported: 2016-06-17 17:09 UTC by Alexander Kyte
Modified: 2018-01-24 16:30 UTC (History)
4 users (show)

Tags: bitcode_mobile_static
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:

Description Alexander Kyte 2016-06-17 17:09:38 UTC
The following tests abort threads:


On bitcode, this results in the entire runtime coming to a screeching halt with the following stacktrace:

        0   mono                                0x000000010fd19fae mono_handle_native_sigsegv + 334
        1   mono                                0x000000010fe218f5 sigabrt_signal_handler + 165
        2   libsystem_platform.dylib            0x00007fff8aed0eaa _sigtramp + 26
        3   ???                                 0x0000000048617ab0 0x0 + 1214347952
        4   libsystem_c.dylib                   0x00007fff8f6926e7 abort + 129
        5   libc++abi.dylib                     0x00007fff91aedf81 __cxa_bad_cast + 0
        6   libc++abi.dylib                     0x00007fff91b13a47 _ZL26default_unexpected_handlerv + 0
        7   libobjc.A.dylib                     0x00007fff991d26c3 _ZL15_objc_terminatev + 124
        8   libc++abi.dylib                     0x00007fff91b1119e _ZSt11__terminatePFvvE + 8
        9   libc++abi.dylib                     0x00007fff91b10c12 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
        10  mono                                0x000000010fd8ce96 mono_llvm_cpp_throw_exception + 38
        11  mono                                0x000000010fd1b0c9 throw_exception + 249
        12  mono                                0x000000010fd1afc7 mono_llvm_throw_exception + 23
        13  mono                                0x000000010fd14bd5 mono_llvm_raise_exception + 21
        14  mono                                0x000000010ff5b024 mono_raise_exception + 36
        15  mono                                0x000000010fe63b80 mono_error_raise_exception + 48
        16  mono                                0x000000010ff0c804 start_wrapper_internal + 1044
        17  mono                                0x000000010ff0c3e1 start_wrapper + 33
        18  mono                                0x00000001100508ef inner_start_thread + 575
        19  libsystem_pthread.dylib             0x00007fff9bc40c13 _pthread_body + 131
        20  libsystem_pthread.dylib             0x00007fff9bc40b90 _pthread_body + 0
        21  libsystem_pthread.dylib             0x00007fff9bc3e375 thread_start + 13
Comment 1 Andi McClure 2016-08-29 16:44:28 UTC
Note: This bug is not specifically about Thread.Abort (which is not supported on any current Bitcode platform anyway) but is a general problem with exception handling in bitcode.
Comment 2 Alexander Kyte 2016-08-29 16:50:43 UTC
This was due to issues with the EH backend in general. Only one landing pad per frame will be entered. These tests were failing for different proximal causes, but the root was this. Also it's worth noting that Thread.Abort isn't supported on WatchOS. Either way, I believe this to be fixed by the pending explicit protected region changes.
Comment 3 Ludovic Henry 2017-09-06 17:57:34 UTC
Alexander, is that fixed on latest Mono version?
Comment 4 Ludovic Henry 2018-01-24 16:30:45 UTC
Please provide information requested in previous comment to reopen. Thank you.