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.
In mono_gc_cleanup, we use mono_thread_internal_stop to stop the finalizer thread.
That API is deprecated and is going untested.
We should replace it with a regular thread abort, by calling mono_thread_internal_abort.
To write a test case for this try the following:
Allocate objects with finalizers that take a long time (sleep, loops, etc).
Force a GC so those objects get in the finalizer queue.
Leave the main thread, triggering shutdown.
Ensure with CWLs and busy looping from the main thread, that we only leave it when finalization started.
This is a nice to have cleanup that would allow us to remove the last remaining user of thread stop, which is a very broken variant of thread abort.
We already abort the thread, the stop is done when the abort fails. _stop () is somewhat guaranteed to succeed.