dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.43k stars 10.02k forks source link

TrimmingTests failing on aspnetcore-quarantined-pr pipeline #54629

Open halter73 opened 7 months ago

halter73 commented 7 months ago

It looks like TrimmingTests have been broken on the aspnetcore-quarantined-pr pipeline for at least a week and probably a lot longer.

I'm not sure exactly why it's failing. project.dll ends up at artifacts\bin\trimmingTests\projects\Microsoft.AspNetCore.TrimmingTests\SlimBuilderDoesNotDependOnX509Test\obj\Release\net9.0\win-x64\project.dll on my machine when I run a ci build.

Sample error:

  Optimizing assemblies for size. This process might take a while.
ILLink : error IL1032: Root assembly 'obj\Release\net9.0\win-x64\project.dll' could not be found. [D:\a\_work\1\s\artifacts\bin\trimmingTests\projects\Microsoft.AspNetCore.TrimmingTests\SlimBuilderDoesNotDependOnX509Test\project.csproj]
##[error]ILLink(0,0): error IL1032: (NETCORE_ENGINEERING_TELEMETRY=Build) Root assembly 'obj\Release\net9.0\win-x64\project.dll' could not be found.
D:\a\_work\1\s\.packages\microsoft.net.illink.tasks\9.0.0-preview.3.24160.3\build\Microsoft.NET.ILLink.targets(91,5): error NETSDK1144: Optimizing assemblies for size failed. [D:\a\_work\1\s\artifacts\bin\trimmingTests\projects\Microsoft.AspNetCore.TrimmingTests\SlimBuilderDoesNotDependOnX509Test\project.csproj]
##[error].packages\microsoft.net.illink.tasks\9.0.0-preview.3.24160.3\build\Microsoft.NET.ILLink.targets(91,5): error NETSDK1144: (NETCORE_ENGINEERING_TELEMETRY=Build) Optimizing assemblies for size failed.
  Optimizing assemblies for size. This process might take a while.
ILLink : error IL1032: Root assembly 'obj\Release\net9.0\win-x64\project.dll' could not be found. [D:\a\_work\1\s\artifacts\bin\trimmingTests\projects\Microsoft.AspNetCore.TrimmingTests\UseHttpsDoesDependOnX509Test\project.csproj]
##[error]ILLink(0,0): error IL1032: (NETCORE_ENGINEERING_TELEMETRY=Build) Root assembly 'obj\Release\net9.0\win-x64\project.dll' could not be found.
D:\a\_work\1\s\.packages\microsoft.net.illink.tasks\9.0.0-preview.3.24160.3\build\Microsoft.NET.ILLink.targets(91,5): error NETSDK1144: Optimizing assemblies for size failed. [D:\a\_work\1\s\artifacts\bin\trimmingTests\projects\Microsoft.AspNetCore.TrimmingTests\UseHttpsDoesDependOnX509Test\project.csproj]
##[error].packages\microsoft.net.illink.tasks\9.0.0-preview.3.24160.3\build\Microsoft.NET.ILLink.targets(91,5): error NETSDK1144: (NETCORE_ENGINEERING_TELEMETRY=Build) Optimizing assemblies for size failed.

https://dev.azure.com/dnceng-public/public/_build/results?buildId=600931&view=logs&j=6d5af08c-e114-5ffe-77df-bfb882f83762&t=1236264d-1784-5615-742c-dbfd7ef2168f&l=521

If there's another pipeline where it's working, maybe we can skip it in the quarantined pipeline.

@amcasey @JamesNK @eerhardt @wtgodbe

eerhardt commented 7 months ago

Do we have a binlog? It would be easier to analyze the failure if there was a binlog.

halter73 commented 7 months ago

We currently pass in -nobl, so no.

Edit: Maybe we'll get some from #54632

radical commented 7 months ago

Build.binlog

wtgodbe commented 7 months ago

@eerhardt @halter73 looks like we have a binlog, can we continue the investigation?

eerhardt commented 7 months ago

@eerhardt @halter73 looks like we have a binlog, can we continue the investigation?

I won't be able to do an investigation for the next couple days.

radical commented 7 months ago

I'll try to investigate.

radical commented 7 months ago

Are the trimming tests run on some other pipeline too? I want to compare against a working build.

Essentially, $(BaseIntermediateOutputPath)=obj\ which is because, IIUC, $(UseArtifactsOutput)='' and thus it picks a relative path. So, all the trimming projects like /mnt/vss/_work/1/s/artifacts/bin/trimmingTests/projects/Microsoft.AspNetCore.DataProtection.TrimmingTests/TestCertificateXmlEncryptor/project.csproj end up getting this relative path for the intermediate assembly - obj/Releaes/net9.0/linux-x64/project.dll.

The sdk uses artifacts path if UseArtifactsOutput='true' or $(ArtifactsPath)!=''. I don't know if something for this changed recently in the sdk, or arcade. We could set either of these, and maybe that will fix the issue. But it would be useful to check against any working runs that we might have with the same repo+branch.

wtgodbe commented 7 months ago

@dotnet/dnceng do you know if there's been a change in Arcade recently that would cause a change to either UseArtifactsOutput or ArtifactsPath?