-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
ConvertDllsToWebCil fails ugly for invalid assembly #101154
Comments
Same thing is happening in aspire-samples here: https://github.com/dotnet/aspire-samples/actions/runs/8680403862/job/23941003242#step:6:245 |
@sbomer any idea why the trimmer have started producing empty or invalid assemblies recently? |
I opened this to track the bad error message. If the trimmer is producing an empty file because of a bug rather than something wierd in the aspire-samples build (and this may well be the case, IDK) that would be a separate bug. It keeps happening there, though eg https://github.com/dotnet/aspire-samples/actions/runs/8725954534/job/23940133588?pr=209 sometimes Windows sometimes Linux. |
No. We recently changed some of the PE headers in #101038, but I don't see how that would lead to this crash, and especially not nondeterministically. Can we confirm which file is being passed to ConvertDllsToWebCil that is causing the failure? |
As @sebastienros points out, this is happening quite a lot in the CI for dotnet/aspire-samples, specifically on this project: https://github.com/dotnet/aspire-samples/tree/996dd5e7909ef60a561e6372ad40559441f66b91/samples/Metrics/MetricsApp.Client |
A workaround for the time being is to set |
Could it be a some kind of race condition from running the publish in parallel? https://github.com/dotnet/aspire-samples/blob/main/build/Build.proj#L29 |
@maraf I created this PR to disable it dotnet/aspire-samples#214 but this does the same thing. |
I believe this inner parallel double publish dotnet/aspire-samples#214 (comment) is also the root case of this issue with empty trimmed dlls EDIT: Confirmed, the |
@maraf just in case its due to some of the workarounds I had to add for my work, I've created a PR that removes them dotnet/sdk#39689 |
Somewhere in this stack it should catch BadImageFormatException and
Log.ErrorFromException(..)
then return false from the task.I assume the repro is to feed the task an empty file, or similar.
version: 8.0.4
just after
I get
https://productionresultssa13.blob.core.windows.net/actions-results/5604d4bc-a8b0-4df9-99a1-482f4b6ac748/workflow-job-run-1d849a45-2f30-5fbb-3226-b730a17a93af/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-04-17T01%3A10%3A19Z&sig=o0tEe09NJLnPaaMWW9u67PdcAsaTGDKrNhyowktpPiE%3D&sp=r&spr=https&sr=b&st=2024-04-17T01%3A00%3A14Z&sv=2021-12-02
I don't know where the bug is leading to this, perhaps the trimming is producing an empty file, but that's a separate issue.
The text was updated successfully, but these errors were encountered: