This project is read-only.
3

Closed

NuGet fails to install deep dependency tree due to MachineCache 100 package limit

description

If you try and install a package with a very deep dependency tree (greater than 100 packages) the MachineCache will trigger a cleanup of the cache prior to the full tree being resolved. This is not tracked by the install process, and results in a failure when the install tree has been computed as the packages are no longer local to the MachineCache.

file attachments

Closed Jun 6, 2013 at 7:53 PM by deepakverma

comments

BenPhegan wrote Sep 19, 2012 at 5:56 AM

Reproducible via the attached powershell (used to create the packages) + a nuget feed + commandline below:

C:\nugettest\test>c:\nuget\1.7\NuGet.exe install Anotherpackage1 -s http://theta.nuget.dev/api/feeds -o test5
Attempting to resolve dependency 'Testpackage120'.
Attempting to resolve dependency 'Testpackage119'.
Attempting to resolve dependency 'Testpackage118'.
Attempting to resolve dependency 'Testpackage117'.
Attempting to resolve dependency 'Testpackage116'.
Attempting to resolve dependency 'Testpackage115'.
Attempting to resolve dependency 'Testpackage114'.
Attempting to resolve dependency 'Testpackage113'.
Attempting to resolve dependency 'Testpackage112'.
Attempting to resolve dependency 'Testpackage111'.
Attempting to resolve dependency 'Testpackage110'.
Attempting to resolve dependency 'Testpackage109'.
Attempting to resolve dependency 'Testpackage108'.
Attempting to resolve dependency 'Testpackage107'.
Attempting to resolve dependency 'Testpackage106'.
Attempting to resolve dependency 'Testpackage105'.
Attempting to resolve dependency 'Testpackage104'.
Attempting to resolve dependency 'Testpackage103'.
Attempting to resolve dependency 'Testpackage102'.
Attempting to resolve dependency 'Testpackage101'.
Attempting to resolve dependency 'Testpackage100'.
Attempting to resolve dependency 'Testpackage99'.
Attempting to resolve dependency 'Testpackage98'.
Attempting to resolve dependency 'Testpackage97'.
Attempting to resolve dependency 'Testpackage96'.
Attempting to resolve dependency 'Testpackage95'.
Attempting to resolve dependency 'Testpackage94'.
Attempting to resolve dependency 'Testpackage93'.
Attempting to resolve dependency 'Testpackage92'.
Attempting to resolve dependency 'Testpackage91'.
Attempting to resolve dependency 'Testpackage90'.
Attempting to resolve dependency 'Testpackage89'.
Attempting to resolve dependency 'Testpackage88'.
Attempting to resolve dependency 'Testpackage87'.
Attempting to resolve dependency 'Testpackage86'.
Attempting to resolve dependency 'Testpackage85'.
Attempting to resolve dependency 'Testpackage84'.
Attempting to resolve dependency 'Testpackage83'.
Attempting to resolve dependency 'Testpackage82'.
Attempting to resolve dependency 'Testpackage81'.
Attempting to resolve dependency 'Testpackage80'.
Attempting to resolve dependency 'Testpackage79'.
Attempting to resolve dependency 'Testpackage78'.
Attempting to resolve dependency 'Testpackage77'.
Attempting to resolve dependency 'Testpackage76'.
Attempting to resolve dependency 'Testpackage75'.
Attempting to resolve dependency 'Testpackage74'.
Attempting to resolve dependency 'Testpackage73'.
Attempting to resolve dependency 'Testpackage72'.
Attempting to resolve dependency 'Testpackage71'.
Attempting to resolve dependency 'Testpackage70'.
Attempting to resolve dependency 'Testpackage69'.
Attempting to resolve dependency 'Testpackage68'.
Attempting to resolve dependency 'Testpackage67'.
Attempting to resolve dependency 'Testpackage66'.
Attempting to resolve dependency 'Testpackage65'.
Attempting to resolve dependency 'Testpackage64'.
Attempting to resolve dependency 'Testpackage63'.
Attempting to resolve dependency 'Testpackage62'.
Attempting to resolve dependency 'Testpackage61'.
Attempting to resolve dependency 'Testpackage60'.
Attempting to resolve dependency 'Testpackage59'.
Attempting to resolve dependency 'Testpackage58'.
Attempting to resolve dependency 'Testpackage57'.
Attempting to resolve dependency 'Testpackage56'.
Attempting to resolve dependency 'Testpackage55'.
Attempting to resolve dependency 'Testpackage54'.
Attempting to resolve dependency 'Testpackage53'.
Attempting to resolve dependency 'Testpackage52'.
Attempting to resolve dependency 'Testpackage51'.
Attempting to resolve dependency 'Testpackage50'.
Attempting to resolve dependency 'Testpackage49'.
Attempting to resolve dependency 'Testpackage48'.
Attempting to resolve dependency 'Testpackage47'.
Attempting to resolve dependency 'Testpackage46'.
Attempting to resolve dependency 'Testpackage45'.
Attempting to resolve dependency 'Testpackage44'.
Attempting to resolve dependency 'Testpackage43'.
Attempting to resolve dependency 'Testpackage42'.
Attempting to resolve dependency 'Testpackage41'.
Attempting to resolve dependency 'Testpackage40'.
Attempting to resolve dependency 'Testpackage39'.
Attempting to resolve dependency 'Testpackage38'.
Attempting to resolve dependency 'Testpackage37'.
Attempting to resolve dependency 'Testpackage36'.
Attempting to resolve dependency 'Testpackage35'.
Attempting to resolve dependency 'Testpackage34'.
Attempting to resolve dependency 'Testpackage33'.
Attempting to resolve dependency 'Testpackage32'.
Attempting to resolve dependency 'Testpackage31'.
Attempting to resolve dependency 'Testpackage30'.
Attempting to resolve dependency 'Testpackage29'.
Attempting to resolve dependency 'Testpackage28'.
Attempting to resolve dependency 'Testpackage27'.
Attempting to resolve dependency 'Testpackage26'.
Attempting to resolve dependency 'Testpackage25'.
Attempting to resolve dependency 'Testpackage24'.
Attempting to resolve dependency 'Testpackage23'.
Attempting to resolve dependency 'Testpackage22'.
Attempting to resolve dependency 'Testpackage21'.
Attempting to resolve dependency 'Testpackage20'.
Attempting to resolve dependency 'Testpackage19'.
Attempting to resolve dependency 'Testpackage18'.
Attempting to resolve dependency 'Testpackage17'.
Attempting to resolve dependency 'Testpackage16'.
Attempting to resolve dependency 'Testpackage15'.
Attempting to resolve dependency 'Testpackage14'.
Attempting to resolve dependency 'Testpackage13'.
Attempting to resolve dependency 'Testpackage12'.
Attempting to resolve dependency 'Testpackage11'.
Attempting to resolve dependency 'Testpackage10'.
Attempting to resolve dependency 'Testpackage9'.
Attempting to resolve dependency 'Testpackage8'.
Attempting to resolve dependency 'Testpackage7'.
Attempting to resolve dependency 'Testpackage6'.
Attempting to resolve dependency 'Testpackage5'.
Attempting to resolve dependency 'Testpackage4'.
Attempting to resolve dependency 'Testpackage3'.
Attempting to resolve dependency 'Testpackage2'.
Attempting to resolve dependency 'Testpackage1'.
Could not find file 'D:\Documents and Settings\username\Local Settings\Application Data\NuGet\Cache\Anotherpackage1.1.0.0.0.nupkg'.

BenPhegan wrote Sep 19, 2012 at 5:57 AM

Very hacky powershell script to produce long nested package trees.

dotnetjunky wrote Sep 19, 2012 at 10:58 AM

Ha, good bug (or bad bug, depending our your perspective)

BenPhegan wrote Sep 19, 2012 at 11:54 AM

It made me look at the MachineCache code again, so...bad bug. Very bad bug. :)

Seriously though, looked at coding up a fix for this to make it a variable maximum, and none of the things I looked into are very elegant...and I am not sure they can be based on the existing code. Would love some other input.

Believe it or not, we have actually hit this issue multiple times in our production build environment, so fairly keen to sort it out! Why we have dependency graphs this deep is another issue entirely.... (sigh)

JeffHandley wrote Jan 23, 2013 at 10:18 PM

Triage: moved into 2.3 due to high vote count.

dotnetjunky wrote Jan 24, 2013 at 11:27 PM

Given that this is a very rare condition, we will not address it ourselves but we will accept pull request.

dotnetjunky wrote Mar 20, 2013 at 5:35 AM

Pull request submitted for this issue.

dotnetjunky wrote Mar 27, 2013 at 11:10 PM

Fixed in changeset a99b6aab387639bbeda7c61d7500b867edf26a15