-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
TaskCanceledException in msbuild while building on OSX-x64 #69190
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@jeffkl Seen this apparent NuGet SDK resolver cancellation? |
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsPipeline: https://dev.azure.com/dnceng/public/_build/results?buildId=1764261&view=logs&j=1f8f000c-1adc-5434-677a-95dd9e006aba /Users/runner/work/1/s/.dotnet/sdk/7.0.100-preview.3.22179.4/MSBuild.dll /nologo -maxcpucount /m -verbosity:m /v:minimal /bl:/Users/runner/work/1/s/artifacts/log/Checked/ToolsetRestore.binlog /clp:Summary /clp:ErrorsOnly;NoSummary /nr:false /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=true /p:__ToolsetLocationOutputFile=/Users/runner/work/1/s/artifacts/toolset/7.0.0-beta.22255.2.txt /t:__WriteToolsetLocation /warnaserror /Users/runner/work/1/s/artifacts/toolset/restore.proj
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : System.AggregateException: One or more errors occurred. (A task was canceled.)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.NuGetAbstraction.GetSdkResult(SdkReference sdk, Object nuGetVersion, SdkResolverContext context, SdkResultFactory factory)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.BackEnd.SdkResolution.CachingSdkResolverService.<>c__DisplayClass3_0.<ResolveSdk>b__2()
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at System.Lazy`1.CreateValue()
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.BackEnd.SdkResolution.CachingSdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
/Users/runner/work/1/s/artifacts/toolset/restore.proj : error : at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult) I hit this in #69180 as well (log]. @rainersigwald any idea what this could be?
|
@rainersigwald I haven't seen that before. This part of the code hasn't changed in a long time. Since its run in a constructor, it can't really use async tasks and doesn't pass around a cancellation token. I wonder if the auth provider is involved and is timing out? Does this build use authenticated feeds? |
No, I believe this only uses public feeds without any auth. |
Okay so no auth, this code path still does a lot of work restoring a package by connecting to the feed to get the versions, downloading the package, and unzipping it. I suppose it could be an intermittent issue with the feed. What is the impact of this? Is it happening a lot? I've been working on major improvements to the NuGet SDK resolver and adding logging which will help diagnosability. |
So far I have seen this in just a couple of builds, but I will keep an eye out. Hopefully this is just some transient issue with our feeds. |
@jakobbotsch sounds good, very sorry for the failure. Please keep me in the loop if you keep seeing it. I'll continue working on improving the resolver in the meantime! |
Another instance in https://dev.azure.com/dnceng/public/_build/results?buildId=1765596&view=results in Build iOS arm64 Release AllSubsets_Mono |
This might be related to/fixed by NuGet/NuGet.Client#4596 but maybe it's hit in some other code path as well? (But from BCL point of view, that was also patched in #68649) |
Good guess. These issues are being hit during build which is using preview3, so in that case this should resolve once a new SDK propagates. |
Which will happen in 2-3 weeks as part of the next infrastructure rollout :) I'm already testing the ingestion of the P4 SDK to find issues early. |
@ViktorHofer when is the infrastructure rollout that would bring the fix above? |
cc @agocke who is driving the SDK upgrade this month. Andy, everything should be ready by now, right? We would need to send out a mail to the runtimerepo alias and open a GH issue and pin it, for internal and external communication. |
Finishing up testing now: #70117 When that's done we can send the email out, pin the issue, and merge. |
Preview 5 SDK update has been merged |
Pipeline: https://dev.azure.com/dnceng/public/_build/results?buildId=1764261&view=logs&j=1f8f000c-1adc-5434-677a-95dd9e006aba
Log: https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/1764261/logs/187
I hit this in #69180 as well (log].
Binlog: ToolsetRestore.zip
@rainersigwald any idea what this could be?
Report
Summary
The text was updated successfully, but these errors were encountered: