Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
The above function is not signal safe, but it is called from mono_jit_info_table_find () which is supposed to be signal safe.
This causes deadlocks when it is called from a signal context, which happens in a lot of places inside the runtime.
This issue is similar to https://bugzilla.xamarin.com/show_bug.cgi?id=2190, but it happens outside the debugger too, like
in is_ip_in_managed_allocator () when using sgen.
Added a workaround in 6e2cd82527056eb83396db4a40196cf929d975f0 to the sgen case, which only works on platforms with no managed allocators/write barrier methods, i.e. sgen on mt.
A complete solution would be loading this information when an AOT method is loaded, like we do when debugging is enabled. This would completely solve the issue, but it would have performance implications, i.e.:
- loading this information would take time and consume memory.
- we would have to disable direct calls between AOT methods.
According to Zoltan, the occasional hangs/timeouts I'm seeing with mono/tests/delegate2.exe are due to this problem. In the test framework, the test times out. When run manually, it actually hangs.
My platform is OpenSuse 12.3/amd64.
When hung, "strace -p" says it is stuck here,
futex(0x1b9cf0c, FUTEX_WAIT_PRIVATE, 3, NULL
Work around with,
mono -O=-aot delegate2.exe
Without the workaround, I was seeing a timeout about 10% of the time. With this workaround, I've run thousands of iterations and not seeing the hang.
Documenting this so users/google can find it. E.g., a search for "mono hang futex" should find this.
This was fixed some time ago.