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
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.
I triggered some deadlocks and uploaded the memory dumps while looking into https://bugzilla.xamarin.com/show_bug.cgi?id=46874 for the VS team. The deadlocks I triggered were unrelated to the original bug, so I'm just refiling it here to be dealt with eventually:
--- One comment
I uploaded the memory dumps and the issue was confirmed to be not related to the designer itself (so far). The problem is believed to be the CompleteOnCurrentThread invocation:
> Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() Line 839
> Merq.Async.Core.dll!Merq.AsyncManager.Run(System.Func<System.Threading.Tasks.Task> asyncMethod)
Reassigning this to General for now as there is still nothing actionable from our side. If there are issues with the designer they'd probably be best filed as a new bug with the relevant stacktraces/dumps attached so we can deal with them. We can use this bug to deal with the AsyncManager usage issues.
--- Second relevant comment ---
The deadlock this bug is dealing with was mitigated by changing `AsyncManager.Run` to `AsyncManager.RunAsync` as part of this commit, https://github.com/xamarin/XamarinVS/commit/f18ef199b768479ba936908ba82d24b9ade032b1, however the usage of `AsyncManager.RunAsync` is incorrect and can lead to deadlocks.
This is the same as bug #49846, but the patch applied to close that bug appears to violate some of the VS threading rules and so can lead to deadlocks. Leaving this bug open until we can deal with it properly.
As the intent of this bug is to deal with the AsyncManager usage issues, I'm updating the target milestone to C10, so we can keep tracking of any potential fixes around it, if needed.
The AsyncManager usage was removed in the cases where we have found it deadlocking. The main reason for the removal is that the calls were unnecessary. The secondary reason is that it is not safe to wrap arbitrary code with `AsyncManager.Run` invocations due to the restrictions imposed by the underlying JoinableTaskFactory.Run. It can cause correct asynchronous code to deadlock the IDE.
We are not sure about the steps which will help us to reproduce this issue.
It would be great If you give your valuable response which would help us to reproduce/verify this issue
Unfortunately it's a random deadlock.
However since the code doesn't exist now we know the deadlock also doesn't exist.
Great Thanks @Alan for quick respond.
Closing this issue as per comment6