Bug 8058 - Trivial to deadlock the runtime
Summary: Trivial to deadlock the runtime
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 8029 ()
Depends on:
Blocks:
 
Reported: 2012-10-30 09:54 UTC by Alan McGovern
Modified: 2017-07-13 00:24 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 Alan McGovern 2012-10-30 09:54:39 UTC
I can deadlock MonoDevelop at will by running it from the commandline and hitting ctrl-c during startup. It doesn't happen every time, but it should take less than 5 attempts to trigger it. The bug is essentially that the run time is shutting down when I press ctrl-c, so mono_thread_execute_interruption ends up entering an infinite loop on the main thread where it just calls Thread.Sleep (1000). This makes it impossible for the runtime to actually shut down.

(gdb) bt
#0  0x94b7bbb2 in __semwait_signal ()
#1  0x91ea97b9 in nanosleep$UNIX2003 ()
#2  0x002723ae in SleepEx (ms=1000, alertable=0) at wthreads.c:1026
#3  0x0027242f in Sleep (ms=1000) at wthreads.c:1049
#4  0x002342cd in mono_thread_execute_interruption (thread=0x778010) at threads.c:4049
#5  0x00234909 in mono_thread_interruption_checkpoint_request (bypass_abort_protection=1) at threads.c:4192
#6  0x00234962 in mono_thread_force_interruption_checkpoint () at threads.c:4211
#7  0x0044f072 in ?? ()
#8  0x0000cf22 in mono_jit_runtime_invoke (method=0x3387b94, obj=0x1209b50, params=0x0, exc=0x0) at mini.c:5813
#9  0x001a9caa in mono_runtime_invoke (method=0x3387b94, obj=0x1209b50, params=0x0, exc=0x0) at object.c:2788
#10 0x001a2991 in mono_runtime_object_init (this=0x1209b50) at object.c:105
#11 0x00120aa5 in mono_exception_from_name_domain (domain=0x1d11e50, image=0x233c400, name_space=0x2abab0 "System", name=0x2a0765 "InvalidOperationException") at exception.c:70
#12 0x001209db in mono_exception_from_name (image=0x233c400, name_space=0x2abab0 "System", name=0x2a0765 "InvalidOperationException") at exception.c:40
#13 0x00120d68 in mono_exception_from_name_msg (image=0x233c400, name_space=0x2abab0 "System", name=0x2a0765 "InvalidOperationException", msg=0x29e2c8 "") at exception.c:182
#14 0x001211a1 in mono_get_exception_invalid_operation (msg=0x29e2c8 "") at exception.c:333
#15 0x001dd3d9 in mono_reflection_create_dynamic_method (mb=0x1209598) at reflection.c:11488
#16 0x07ee4abc in ?? ()
#17 0x07ee465c in ?? ()
#18 0x07ee4054 in ?? ()
#19 0x07edec3c in ?? ()
#20 0x07eb1502 in ?? ()
#21 0x07ee68b0 in ?? ()
#22 0x07ee67cc in ?? ()
#23 0x07eb0d90 in ?? ()
#24 0x07eafee4 in ?? ()
#25 0x07ee8848 in ?? ()
#26 0x07e079bc in ?? ()
#27 0x07e0795c in ?? ()
#28 0x07e066f4 in ?? ()
#29 0x004b7241 in ?? ()
#30 0x0000cf22 in mono_jit_runtime_invoke (method=0xbde354, obj=0x0, params=0x0, exc=0xbfffec80) at mini.c:5813
#31 0x001a9caa in mono_runtime_invoke (method=0xbde354, obj=0x0, params=0x0, exc=0xbfffec80) at object.c:2788
#32 0x001a351a in mono_runtime_class_init_full (vtable=0x3620e74, raise_exception=0) at object.c:372
#33 0x0000c7e2 in mono_jit_compile_method_with_opt (method=0xbfffed18, opt=3221220632, ex=0xbfffed44) at mini.c:5363
#34 0x0000cdbf in mono_jit_runtime_invoke (method=0xbde33c, obj=0x11c6008, params=0xbfffedc0, exc=0x0) at mini.c:5648
#35 0x001a9caa in mono_runtime_invoke (method=0xbde33c, obj=0x11c6008, params=0xbfffedc0, exc=0x0) at object.c:2788
#36 0x001acfec in mono_runtime_invoke_array (method=0xbde33c, obj=0x11c6008, params=0x11c5fe8, exc=0x0) at object.c:4162
#37 0x0012f5c9 in ves_icall_InternalInvoke (method=0x11c5f90, this=0x0, params=0x11c5fe8, exc=0xbfffef5c) at icall.c:2866
#38 0x05bf2270 in ?? ()
#39 0x05bf1d54 in ?? ()
#40 0x05bf1b9d in ?? ()
#41 0x05bf1b73 in ?? ()
#42 0x05bf0b08 in ?? ()
#43 0x05bf091c in ?? ()
#44 0x05f21ce8 in ?? ()
#45 0x05f21c92 in ?? ()
#46 0x05f21bf4 in ?? ()
#47 0x05f219ec in ?? ()
#48 0x05f21834 in ?? ()
#49 0x05f2174c in ?? ()
#50 0x07e05af8 in ?? ()
#51 0x07e05ac8 in ?? ()
#52 0x07e05854 in ?? ()
#53 0x043eb218 in ?? ()
#54 0x004b6fe8 in ?? ()
#55 0x004b6de4 in ?? ()
#56 0x004b6eaa in ?? ()
#57 0x0000cf22 in mono_jit_runtime_invoke (method=0x333881c, obj=0x0, params=0xbffff598, exc=0x0) at mini.c:5813
#58 0x001a9caa in mono_runtime_invoke (method=0x333881c, obj=0x0, params=0xbffff598, exc=0x0) at object.c:2788
#59 0x001ac7cc in mono_runtime_exec_main (method=0x333881c, args=0x10007c0, exc=0x0) at object.c:3964
#60 0x001aba31 in mono_runtime_run_main (method=0x333881c, argc=1, argv=0xbffff7ec, exc=0x0) at object.c:3594
#61 0x00068e85 in mono_jit_exec (domain=0x1d11e50, assembly=0x6195c0, argc=2, argv=0xbffff7e8) at driver.c:944
#62 0x0006b419 in mono_main (argc=4, argv=0xbffff7e0) at driver.c:1003
#63 0x00001e19 in main (argc=4, argv=0xbffff7e0) at main.c:89
Comment 1 Alan McGovern 2012-10-30 09:55:42 UTC
This is on Mono 2.10.10.
Comment 2 Rodrigo Kumpera 2012-10-30 11:48:08 UTC
*** Bug 8029 has been marked as a duplicate of this bug. ***
Comment 3 Rodrigo Kumpera 2017-07-13 00:24:57 UTC
I can't repro this anymore plus the interrupt code got a TON of work in the last 5 years.