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.
WaitHandle.WaitAny will deadlock if the thread is interrupted.
This happens to mdtool: it calls WaitAny and at process shutdown waits for the thread to finish. The thread has been interrupted, so the WaitAny will never return, thus the process will never exit either.
Created attachment 3002 [details]
Rodrigo, I believe this is somewhat your area, can you review the attached patch?
It looks like this was detected some time ago: https://bugzilla.novell.com/show_bug.cgi?id=549807#c5
The patch looks good except the remaining time calculation doesn't handle ticks overflow.
Nerver mind, we're using unsigned math already which handles this fine. So, patch looks good, please commit.
Would it be better to use mono_100ns_ticks instead of mono_msec_ticks? If I did the math right it won't overflow in 29k years.
It doesn't matter, both are monotonic, which is important. The current schema would only be a problem if we get 2 wrap around in the same call, which is not an issue at all.
From the implementation of mono_msec_ticks it looks like it will overflow every 49 days (the number of ms that fit in a uint32).
A slightly different version has been committed.
*** Bug 7003 has been marked as a duplicate of this bug. ***