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 for Bug 60363 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
The following commit, https://github.com/mono/mono/commit/52b96a92338bac9107cefc3cf316120c8449e397, changed the behavior to use mono_thread_join to wait upon a thread in ves_icall_System_Threading_Thread_Join_internal. Since the finalizer thread is periodically running mono_threads_join_threads, there might be a small risk that the finalizer thread is currently waiting on the same thread id, and then mono_thread_join won’t find the thread id in the list and assumes the thread has already completed. This issue was explained in https://github.com/mono/mono/pull/5599, but with above commit it is now causing sporadic failures.
The fix is not make it possible for a mono_thread_join to detect if another thread is joining the same thread id and wait until that thread has completed its join (should be a quite small window). That will prevent threads doing mono_thread_join in parallel on the same thread id to race.