Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate the NuGet restore behavior #32764

Closed
jaredpar opened this issue Feb 24, 2020 · 8 comments · Fixed by #33113, #33277 or #33396
Closed

Mitigate the NuGet restore behavior #32764

jaredpar opened this issue Feb 24, 2020 · 8 comments · Fixed by #33113, #33277 or #33396
Labels
area-Infrastructure blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' blocking-official-build untriaged New issue has not been triaged by the area owner

Comments

@jaredpar
Copy link
Member

jaredpar commented Feb 24, 2020

There is a NuGet restore issue which is failing a significant number of our CI / PR builds (as of this time about 6%).

It will likely be several weeks before an actual NuGet fix can make it to our repository (just following standard code flow). That's too long given the magnitude of the failure here.

Short term though there does appear to be a viable work around for us. The linux based jobs need to add a step before arcade build which:

  1. Creates /tmp/NuGetScratch (using the appropriate temp variable)
  2. Run chmod -R ugo+rwx on the created directory

This should remove the restore error until the actual fix comes along.

Places we need to insert this script call:


Symptoms of the bug:

src/libraries/Directory.Build.props#L38
src/libraries/Directory.Build.props(38,3): error : System.AggregateException: One or more errors occurred. (Could not find a part of the path '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/NuGetScratch/ccd9d22adb6549f086362689e42245d6/9c159c0681d8495c9d48c5e0d296844d.proj.nuget.dgspec.json'.)
 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/NuGetScratch/ccd9d22adb6549f086362689e42245d6/9c159c0681d8495c9d48c5e0d296844d.proj.nuget.dgspec.json'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at NuGet.ProjectModel.DependencyGraphSpec.Save(String path)
   at NuGet.Commands.NoOpRestoreUtilities.PersistDGSpecFile(DependencyGraphSpec spec, String dgPath, ILogger log)
   at NuGet.Commands.RestoreCommand.EvaluateCacheFile()
   at NuGet.Commands.RestoreCommand.ExecuteAsync(CancellationToken token)
   at NuGet.Commands.RestoreRunner.ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token)
   at NuGet.Commands.RestoreRunner.CompleteTaskAsync(List`1 restoreTasks)
   at NuGet.Commands.RestoreRunner.RunWithoutCommit(IEnumerable`1 restoreRequests, RestoreArgs restoreContext)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.NuGetAbstraction.GetSdkResult(SdkReference sdk, Object nuGetVersion, SdkResolverContext context, SdkResultFactory factory)
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 24, 2020
@jaredpar
Copy link
Member Author

@safern would you be able to take a look at this? It's killing a large number of our builds ATM.

@jaredpar jaredpar added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' blocking-official-build labels Feb 26, 2020
@jaredpar
Copy link
Member Author

@CoffeeFlux yeah it's hitting roughly 6% of all builds in dotnet/runtime across all our build definitions. Having trouble finding someone with sufficient Unix skills + AzDO understanding to get this worked around. Typical group is otherwise engaged at the moment.

@CoffeeFlux
Copy link
Contributor

Gotcha, unfortunate. There's no way to get a backport or something from the Nuget team? It's particularly annoying since it seems I can't restart the lane until everything is done thanks to the way AzDO works, and it's an early failure.

@jaredpar
Copy link
Member Author

@CoffeeFlux

The NuGet fix is available now. I'm guessing it will take another few days for this to flow to arcade and then to runtime. Given how deeply it's integrated into the SDK it's not an easy piece to isolate and update separately.

Best path is for us to implement the work around. It's targeted and fairly straight forward.

@jaredpar
Copy link
Member Author

jaredpar commented Mar 2, 2020

Mitigation is ineffective. Have to wait on the official bits to flow. Keeping this open to track the underlying problem.

@jaredpar
Copy link
Member Author

jaredpar commented Mar 3, 2020

Blocked by dotnet/sdk#10759

@jaredpar
Copy link
Member Author

jaredpar commented Mar 9, 2020

Re-opening because we're still hitting this issue

Build Kind Timeline Record
552090 PR #33336 Build
552009 PR #33005 Restore
551754 PR #33318 Send to Helix
550788 PR #33242 Build product
550391 Rolling Build product
550212 PR #33318 Build product

@jaredpar jaredpar reopened this Mar 9, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' blocking-official-build untriaged New issue has not been triaged by the area owner
Projects
None yet
4 participants