This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 2190 - sdb interrupt code not signal safe
: sdb interrupt code not signal safe
Status: REOPENED
Product: Runtime
Classification: Mono
Component: Debug
: unspecified
: PC Windows
: Highest normal
: ---
Assigned To: Bugzilla
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-11-24 08:07 EST by Rolf Bjarne Kvinge
Modified: 2012-03-15 22:21 EDT (History)
5 users (show)

See Also:
Tags:
Test Case URL:
External Submit: ---


Attachments
t a a bt (19.84 KB, text/plain)
2011-11-24 08:07 EST, Rolf Bjarne Kvinge
Details
another stack trace (18.20 KB, text/plain)
2012-03-15 19:30 EDT, Scott Blomquist (sblom)
Details

Description Rolf Bjarne Kvinge 2011-11-24 08:07:54 EST
Created attachment 944 [details]
t a a bt

See attached stack traces for all threads.
Comment 2 Rolf Bjarne Kvinge 2011-11-24 08:09:22 EST
Zoltan, any ideas about this sdb deadlock?
Comment 4 Zoltan Varga 2011-11-24 11:34:18 EST
This is a runtime bug. The stack walking code calls into the metadata code
which tries to lock the loader lock, which shouldn't happen since the stack
walking code needs to be async safe.
Comment 5 Zoltan Varga 2011-11-24 14:07:27 EST
Fixed by 614da57287da7556581f1e0c6ce5fbccf93718b5 on the mono-2-10 branch.
Comment 6 Zoltan Varga 2011-11-24 14:07:44 EST
-> FIXED.
Comment 8 Zoltan Varga 2011-12-16 19:39:24 EST
This is the same issue, but it will be much hard to fix this time.
Comment 9 Zoltan Varga 2011-12-18 06:23:50 EST
The problem here is that the MonoJitInfo structures for AOT methods are
allocated lazily to speed things up, this process is not signal safe, but it is
called from mono_jit_info_table_find (), which is supposed to be signal safe.
Comment 12 Zoltan Varga 2011-12-22 14:47:22 EST
The last stack trace is for the original issue which should already be fixed by
46514d58f50b4830fc5f440305284e on mobile-master.
Comment 13 Rolf Bjarne Kvinge 2011-12-22 17:00:32 EST
Right, that patch was never backported to the mobile-master branch MT stable is
using.
Comment 14 Rolf Bjarne Kvinge 2011-12-22 17:07:04 EST
Actually, I'm wrong, I got mixed up.

Zoltan, it seems like you fixed half the issue in exceptions-x86.c. In
mono_arch_find_jit_info there were two blocks that called
mono_arch_get_argument_info, in that patch you removed one (line ~821), but
there is another one left (line ~880). You can also see this from the stack
trace, the exceptions-x86.c frame has a different line number.
Comment 15 Zoltan Varga 2011-12-22 19:50:39 EST
Yeah, I missed that. That case is also hard to fix similar to the second issue.
Comment 16 Scott Blomquist (sblom) 2012-03-15 19:30:48 EDT
Created attachment 1525 [details]
another stack trace

This problem is an almost daily source of extreme pain for my co-workers and me
as well. I've attached an example of one of our stack traces.
Comment 18 Zoltan Varga 2012-03-15 20:08:56 EDT
Will try to find a solution.
Comment 19 Zoltan Varga 2012-03-15 22:21:52 EDT
Added a workaround in 06ecae6a4712e27c95153d4b9d0c60a89fa82b57.

Note You need to log in before you can comment on or make changes to this bug.