This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 42342 - Restore packages hangs when number of packages > 16
Summary: Restore packages hangs when number of packages > 16
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NuGet (show other bugs)
Version: 6.1.0 (C8)
Hardware: PC Linux
: High major
Target Milestone: (C8)
Assignee: Matt Ward
URL:
: 43631 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-04 10:34 UTC by Sergey Zhukov
Modified: 2016-09-06 16:46 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build: 6.0.2


Attachments

Description Sergey Zhukov 2016-07-04 10:34:54 UTC
When I am trying to restore packages from this solution, monodevelop hangs every time when trying to restore 16-teen package. No matter which solution I use, the hang is always on 16-teen package. If I try to cancel restoration, it does not work. If I try to close Monodevelop, it says that it cannot be closed while packages are restoring. Restoring packages from console using nuget3 works without issues.

Here the solution https://github.com/ServiceStack/Gistlyn/

Output is: 
Restoring NuGet package Mono.Cecil.0.9.6.1.
Restoring NuGet package CefSharp.WinForms.47.0.3.
Restoring NuGet package cef.redist.x64.3.2526.1362.
Restoring NuGet package ServiceStack.4.0.61.
Restoring NuGet package CefSharp.Common.47.0.3.
Restoring NuGet package DeltaCompressionDotNet.1.0.0.
Restoring NuGet package cef.redist.x86.3.2526.1362.
Restoring NuGet package ServiceStack.Interfaces.4.0.61.
Restoring NuGet package ServiceStack.Common.4.0.61.
Restoring NuGet package ServiceStack.Text.4.0.61.
Restoring NuGet package ServiceStack.Client.4.0.61.
Restoring NuGet package ServiceStack.Redis.4.0.61.
Restoring NuGet package ServiceStack.OrmLite.4.0.61.
Restoring NuGet package ServiceStack.Server.4.0.61.
Restoring NuGet package squirrel.windows.1.3.0.
Restoring NuGet package Splat.1.6.2.
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='CefSharp.WinForms',Version='47.0.3')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Interfaces',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='Mono.Cecil',Version='0.9.6.1')
  GET https://www.nuget.org/api/v2/Packages(Id='CefSharp.Common',Version='47.0.3')
  GET https://www.nuget.org/api/v2/Packages(Id='cef.redist.x86',Version='3.2526.1362')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Common',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='cef.redist.x64',Version='3.2526.1362')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Text',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='DeltaCompressionDotNet',Version='1.0.0')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Client',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Redis',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.OrmLite',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='ServiceStack.Server',Version='4.0.61')
  GET https://www.nuget.org/api/v2/Packages(Id='squirrel.windows',Version='1.3.0')
  GET https://www.nuget.org/api/v2/Packages(Id='Splat',Version='1.6.2')

=== MonoDevelop ===

Version 6.1
Installation UUID: 941343e7-3193-4d86-b495-599972b9f70c
Runtime:
	Mono 4.5.0 (master/8e35235 Sat Apr  2 21:09:06 NOVT 2016)
	GTK+ 2.24.10 (Ambiance theme)

=== NuGet ===

Version: 3.4.3.0

=== Build Information ===

6f2b429df2ca299f6deb820a4b36ad9bc293e867

=== Operating System ===

Linux
Linux sergey 3.2.0-105-generic-pae #146-Ubuntu SMP Fri Jun 10 20:58:31 UTC 2016 i686 i686 i386 GNU/Linux
Comment 1 Matt Ward 2016-07-04 10:54:01 UTC
Unable to reproduce this on the Mac.

Xamarin Studio
Version 6.1 (build 4963)
Installation UUID: 2e3bd8f5-b157-4b31-aa56-d9c12536e261
Runtime:
	Mono 4.4.1 (mono-4.4.0-branch-c7sr0/4747417) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)


Can you attach the IDE log after you have run 'kill -QUIT $PID' replacing $PID with the process id for MonoDevelop. This will not kill MonoDevelop but will force it to dump the callstacks of the threads.

Looking at the build version it looks like you are building MonoDevelop from source. You could try increasing the number of thread pool threads to see if that makes any difference.

https://github.com/mono/monodevelop/blob/c2a2620b6ca07313e896c6d9e13f7fc7be12de30/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs#L583-L584
Comment 2 Sergey Zhukov 2016-07-04 11:29:39 UTC
Yes, on Mac restoration works. This issue is related to linux build.

Thanks for pointing to the place where SetMaxThreads is located. That's what I suspected too (possible low number of completion threads). I'll try it now and say results.
Comment 3 Sergey Zhukov 2016-07-04 11:50:06 UTC
I can confirm this is the the issue with low number of IO completion threads. I increased this number to 32 and now Monodevelop hangs on 32 packages.

I did not look into the nuget code, and I assume that PackageRestoreManager uses HttpWebRequest to get the packages from sources. This means that mono does not support parallel downloading of web resources if number of resources is greater than number of completion threads. Or possible there is incorrect usage of Task Scheduler in monodevelop which does not allow to get several resources simultaneously.
Comment 4 Sergey Zhukov 2016-07-04 11:51:31 UTC
Can you please say where IDE logs are located? When I clicked Reveal Logs on menu, I got nothing. In console after `kill -QUIT` I got following info:



"<threadpool thread>"
"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"Finalizer"
"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"GUI Thread"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00012>
  at Gtk.Application.Run () <IL 0x00000, 0x0000b>
  at MonoDevelop.Ide.IdeApp.Run () [0x00000] in /home/sergey/Projects/MonoDevelop/md-master3/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs:386
  at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions) [0x00760] in /home/sergey/Projects/MonoDevelop/md-master3/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:283
  at MonoDevelop.Ide.IdeStartup.Main (string[],MonoDevelop.Ide.Extensions.IdeCustomizer) [0x000a5] in /home/sergey/Projects/MonoDevelop/md-master3/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:594
  at MonoDevelop.Startup.MonoDevelopMain.Main (string[]) [0x00000] in /home/sergey/Projects/MonoDevelop/md-master3/monodevelop/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:39
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x00057, 0x000c6>

"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"<unnamed thread>"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.Thread.SleepInternal (int) <0x00012>
  at System.Threading.Thread.Sleep (int) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/thread.cs:741
  at System.Runtime.Remoting.Channels.Tcp.TcpConnectionPool.ConnectionCollector () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs:110
  at System.Threading.ThreadHelper.ThreadStart_Context (object) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/thread.cs:68
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x00031] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:893
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/thread.cs:105
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004f, 0x0009f>

"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>

"<unnamed thread>"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.IO.InotifyWatcher.ReadFromFD (intptr,byte[],intptr) <0x00012>
  at System.IO.InotifyWatcher.Monitor () [0x00010] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.IO/InotifyWatcher.cs:372
  at System.Threading.ThreadHelper.ThreadStart_Context (object) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/thread.cs:68
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x00031] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:893
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/thread.cs:105
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004f, 0x0009f>

"Threadpool worker"  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitOne_internal (intptr,int,bool) <0x00012>
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x00015] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:106
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00017] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:250
  at System.Threading.WaitHandle.WaitOne (long,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:239
  at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001c] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:206
  at System.Threading.WaitHandle.WaitOne () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/waithandle.cs:222
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult) [0x00029] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:877
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult) [0x00011] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:481
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:451
  at Mono.Net.Security.MonoTlsStream.CreateStream (byte[]) [0x0001e] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106
  at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest) [0x0008a] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:405
  at System.Net.WebConnection.InitConnection (object) [0x00087] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:715
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/mcs/class/System/System.Net/WebConnection.cs:106
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) [0x0000e] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1307
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x0008d] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:957
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/executioncontext.cs:904
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1284
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:857
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in /home/sergey/Projects/mono/mono-master/mono/external/referencesource/mscorlib/system/threading/threadpool.cs:1212
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <IL 0x0001f, 0x0004c>
Comment 5 Matt Ward 2016-07-04 12:30:08 UTC
Thanks that is the kill quit output I was looking for.

The thread pool threads all seem to be stuck calling Mono.Security.Protocol.Tls.SslStreamBase.EndRead.

NuGet v3 should be using HttpRequestMessage if the source is a v3 source (ends with index.json) or HttpWebRequest if the source is a v2 source.

Xamarin Studio 6.0 and above all restrict the number of thread pool threads since the IDE now uses a lot more of them. Older versions of Xamarin Studio such as 5.10 do not restrict them.

On the NuGet side I may be able to restrict the number of restores that happen in parallel. Nuget seems to use a DefaultMaxDegreeOfParallelism constant to determine how many tasks are run in parallel for a restore and this is currently set to 16. This will not solve the underlying problem but it may make it less likely to happen when restoring.
Comment 6 Sergey Zhukov 2016-07-04 12:56:38 UTC
DefaultMaxDegreeOfParallelism = 16 already was there or you just added it? Because if it was there that looks it does not work, nuget tries to get 32 packages simultateously when I increase number of threads to 32.
Comment 7 Matt Ward 2016-07-04 13:23:33 UTC
DefaultMaxDegreeOfParallelism = 16 is part of the NuGet source code - not part of MonoDevelop. This 16 limits the number of tasks that are created to do the restore. Each restore task may make multiple web requests for each NuGet package it is trying to restore. Looking at the code it seems to search for the package information, then it with this information it can then make another request to download the NuGet package. So it looks like each restore task would make at least 2 web requests for each NuGet package. These 2 web requests would not be done in parallel though.

If you are seeing 32 restores started in one go then something is not working :)
Comment 8 Sergey Zhukov 2016-07-04 15:11:30 UTC
Is it possible to make monodevelop restoring packages similar like nuget console? Because nuget console does not hang during packages restoration process.
Comment 9 Matt Ward 2016-07-04 15:32:45 UTC
1) nuget that ships with mono uses NuGet v2 which has different behaviour.
2) Using the NuGet v3 console app on Mono would not have the same problem since it does not have a limit on the number of thread pool threads.
3) A very early version of NuGet addin used to just shell out to nuget restore. However in later versions we are directly using the NuGet API to do the restore which gives us more flexibility but unfortunately is also affected by this bug. There are no plans to switch back to using nuget.exe directly.

A workaround would be to disable automatic package restore in preferences and use a build target:

https://github.com/kzu/NuGet.Restore

Or you can just restore outside the MonoDevelop.
Comment 10 Sergey Zhukov 2016-07-04 16:02:54 UTC
Do I correctly understand that It will be impossible to use nuget in Monodevelop anymore? Not all github (and not only github) projects have nuget targets and not all use less than 16 packages.
Comment 11 Matt Ward 2016-07-04 16:15:35 UTC
It sounds like NuGet restore will have some problems with MonoDevelop 6.1 on Linux if there are a large number of packages to restore. I would hope that other parts of NuGet still work since it should not be hitting this thread pool limit for installing and updating.

One fix if you are building MonoDevelop locally would be to not restrict the number of thread pool threads.
Comment 12 Sergey Zhukov 2016-07-04 16:38:46 UTC
I will do this for now, but when MD release be published will it have thread pool limitation? Wouldn't this limitation affect to other addins, which uses FileSystem or Network too?

And maybe there is a way to restore packages one by one (including dependencies) to avoid this weird limitation?
Comment 13 Matt Ward 2016-07-08 14:46:02 UTC
I suspect MonoDevelop will still have the thread pool limit in place. As far as I am aware it is meant to limit the number of threads used by Roslyn.

Looking at the NuGet source code another possible fix instead of trying to reduce the DefaultMaxDegreeOfParallelism would be to throttle the requests. There seems to be some existing logic in NuGet where you can explicitly disable parallel processing. Various NuGet command line commands support it:

HttpSourceResourceProvider.Throttle = SemaphoreSlimThrottle.CreateBinarySemaphore();

https://github.com/NuGet/NuGet.Client/blob/a8931a32cae4a5f410130d9f358b79220e38178b/src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/RestoreCommand.cs#L127-L130

The SemaphoreSlimThrottle looks like it will only allow a single web request to be sent. Although it seems that it does not throttle the reading of the response so it may not fix the problem.
Comment 14 Matt Ward 2016-08-24 12:32:16 UTC
I can reproduce this on the Mac too. Dropping the number of parallel tasks down to 1 seems to fix the problem.
Comment 15 Matt Ward 2016-08-24 12:41:50 UTC
*** Bug 43631 has been marked as a duplicate of this bug. ***
Comment 16 Matt Ward 2016-08-24 12:51:43 UTC
Created a separate branch with a modified version of NuGet 3.4.3 that reduces the number of tasks run in paralle.

https://github.com/mono/monodevelop/tree/cycle8-nuget3-reduce-parallel-tasks
Comment 17 xamarin-release-manager 2016-08-25 18:15:11 UTC
Fixed in version 6.1.0.5373 (cycle8)

Author: Greg Munn
Commit: 1d96f626815f89933e769b5742aa9107ea2bbc0b (mono/monodevelop)
Comment 18 Jatin 2016-08-29 13:57:07 UTC
With the build: XS 6.1.0.5359 I was successfully able to reproduce this issue, as when trying to restore the Nuget Packages, XS hangs and user need to Force Quit XS

Below is the screencast for the same:
http://www.screencast.com/t/G6ONygi5kY

With the latest Cycle 8 build, I have verified this issue and have observed that this issue is now fixed. As now the user is successfully able to restore the nuget packages.

Below is the screencast for the same:
http://www.screencast.com/t/RJUl74QqjoB7

Below is the solution detail I used to verified this issue:
https://github.com/xamarin/QualityAssurance/blob/master/Automation/XQA/XQA.sln

Environment information:
https://gist.github.com/jatin360/65a100da879bd857ca18b068fdd91b6b

Hence, marking this issue as verified.
Comment 19 Matt Ward 2016-09-06 09:50:01 UTC
Applied fix to master:

Xamarin Studio 6.2.0.453
Commit: 86382f33ec701244cd462be76b262ee66df5829d
Comment 20 xamarin-release-manager 2016-09-06 16:46:29 UTC
Fixed in version 6.1.0.5427 (cycle8)

Author: Alan McGovern
Commit: e8fbdac95b28f4142f300b4d016ce2101e8fe108 (mono/monodevelop)

Note You need to log in before you can comment on or make changes to this bug.