-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Do not merge] ASP.NET composite image testing #4538
Conversation
OK, so I updated this PR with the Aspnet Composite tarball built out of the installer repo form @ivdiazsa. Unfortunately we still hit the same issue as this comment: #4532 (comment) I used the SDK version from the last installer build before Ivan's branch, which is SDK version 8.0.100-preview.4.23204.16. I used the dive tool to confirm no files are being overwritten by layering the SDK on top of the aspnet composite image. Also, the image layout looks correct when comparing to our official images:
You should be able to reproduce the error by running |
Thanks Logan for sharing this. I tried to build this on Linux, I had to fix the backslashes around the Dockerfile references to make that work. Do you expect this to be buildable on Windows - I mean, I don't see why it shouldn't but I can easily imagine it's easier said than done. At this point I'm still seeing the build complain about MVID mismatches, that's most likely caused by some of the composite assemblies being rewritten by their non-composite versions, I'm working on figuring out why that happens. |
I have been running these scripts on Windows only using Docker with the WSL2 backend. |
@@ -29,5 +29,6 @@ RUN curl -fSL --output dotnet.tar.gz https://dotnetbuilds.azureedge.net/public/S | |||
&& mkdir -p /usr/share/dotnet \ | |||
&& tar -oxzf dotnet.tar.gz -C /usr/share/dotnet ./packs ./sdk ./sdk-manifests ./templates ./LICENSE.txt ./ThirdPartyNotices.txt \ | |||
&& rm dotnet.tar.gz \ | |||
&& cp /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/Microsoft.Extensions.Logging.Abstractions.dll /usr/share/dotnet/sdk/$DOTNET_SDK_VERSION/Microsoft.Extensions.Logging.Abstractions.dll \ | |||
# Trigger first run experience by running arbitrary cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workaround does work. It's obviously not a long-term solution.
Adding my comment from earlier here for visibility. We've got a problem on our hands. So, @lbussell is facing the MVID mismatch error again here: #4538 (comment) The problem here is... our culprit lies elsewhere. It is the We could hack our way into getting it copied when generating the composite, but I fear we will get a lot of push back from the SDK people, since our project's scope is just ASP.NET. |
What is special about that assembly? Can we check with the owners why it might be causing the MVID mismatch? Is it because its not part of the composite so we are getting an older version or something? |
The reason it is causing the MVID mismatch is because it's part of the composite. And the one in Now, this is an interesting observation. How important is |
Hmm interesting. Perhaps @trylek can do a sanity check that the performance is still reasonable if its removed from the composite. If no perf impact removing it for now would make sense. |
I tried to measure the plaintext benchmark on Linux using the ASP.NET perf lab with and without the assembly
Adding @wtgodbe for ASP.NET and @marcpopMSFT for SDK to chime in. |
Also do we know whether this was the same assembly which was failing when using the composite from asp.net repo? Or was that causing other conflicts as well? |
|
@mangod9 - I believe the primary error I hit in my local testing of Logan's script on Ubuntu was the one discussed above, |
Right. I took it off the text list of the partial composite and that change was enough to make everything work again. |
That is actually interesting, I'm surprised why that just by itself made a difference - the list I merged in a couple of weeks back just indicates for which assemblies Crossgen2 should precompile native code, technically all input assemblies get rewritten and provided with the forwarding composite header, there should be no difference as to version considerations. But maybe the fact that we're unable to resolve a single method from such assembly somehow guides the native runtime the right way. Still, if at some point we decided to fully remove a particular assembly from the composite, it should be done at msbuild level in the script by selectively removing a given set of assemblies from |
Yeah we should certainly investigate the reason for the mismatch. But in the near term if removing that assembly from the composite makes things work (esp. if same applies to the composite built in asp.net repo) we should make progress that way. We can subsequently get the right fix in. |
I agree with Manish. I think that we should definitely understand what's going on, but we no longer have the luxury of time to do so. Since taking that assembly off removes all these roadblocks, I think we should go for that and we can investigate without the rush while the composite images are being tested. |
I'm certainly not opposed to merging in a short-term workaround, I just think that the clean way to do that is to remove the assembly from the BaseAssembly set in the msbuild script. Ivan, please let me know if you want me to put up the PR for this change. |
@trylek Sounds good, thanks a lot Tomas! |
Unfortunately it turns out that exclusing the assembly |
Thankfully I misinterpreted the build failure - it was just a bug in my script change, not a fundamental problem. I should be able to publish the PR with the workaround shortly. |
This is the workaround PR for reference: dotnet/aspnetcore#47747 |
I agree this is a better fix than excluding one-off assemblies in the composite image. I'm not sure why the Microsoft.Extensions versions in the dotnet/sdk are pinned to 6.0. They should be taking the "current" version coming from dotnet/runtime - just like the rest of the assemblies coming from dotnet/runtime. |
I am trying to test the workaround from dotnet/aspnetcore#47747 (comment). @mangod9 says the MVID mismatch shouldn't be happening anymore. That might be the case but I can't be sure yet. The issue is that there isn't a corresponding installer/SDK build (that I can find) that has a coherent runtime with the aspnet build 8.0.0-preview.4.23218.4. Taking the latest SDK build from installer produces some weird results, likely due to the differing runtime versions - If there is a set of SDK and aspnetcore versions that share the same runtime and contain the MVID workaround, we can test that. Otherwise, we need to wait until the aspnet workaround flows into installer and produce a composite tarball out of there. I can update this PR with what I had tried testing shortly. |
@ivdiazsa can you please work with Logan on this, since you were able to verify that removing the Logging assembly from the composite got things "working". Perhaps you just tried |
First let's wait for Tomas' changes to flow into installer. This just doesn't make any sense. If we're still having problems with Tomas' workaround, then we'll have to look into it but now with the full base. |
I'm afraid we've got a bigger problem on our hands. I repro'd the problem @lbussell mentioned and every time I fix an assembly, I get errors from another one. I haven't reached the end of this Pandora's Box yet. That said, there seems to be a pattern. It's been only the |
@ivdiazsa / @lbussell - I have merged in the aspnetcore PR removing the remaining problematic assemblies identified by Ivan from the ASP.NET composite image. My hope is that this change should finally unblock the build of the .NET composite container for Preview 4. An aspnetcore official build is currently running, I guess the next one will start once this one finishes i.e. in a few hours. Based on this fact I believe that tomorrow (on Friday) we should have all the remaining pieces at our disposal. If one or both of you could give that a shot, that would be fantastic. I have booked vacation for tomorrow as I plan to spend the evening with my team peer Mukund who's traveling across Europe but I should be available in early morning PST hours and then in the late afternoon. I might be able to get a bit of additional work done over the weekend if needed. |
@trylek @ivdiazsa I just want to be completely transparent here and make sure we're on the same page. There are two known issues preventing us from shipping aspnet composite images in .NET Docker -
The runtime coherency issue makes these MVID fixes difficult to validate before they flow into dotnet/installer. Ivan's changes to build the aspnet composite tarball out of dotnet/installer are required for us to deliver the composite docker images. We can't have non-functional builds in our nightly repo. I would expect these changes to be in PR/review soon. I have limited bandwidth for manual testing but I can certainly test any builds Ivan provides. You may be able to create a build by flowing dependencies into installer manually with For .NET Docker specifically we have additional time after code complete to make changes, but without the coherency issue addressed and builds published from installer, we're not ready to move forward. |
Perhaps we should have a quick sync on this. From what I have understood both the issues were related to the same root cause and ignoring the assemblies from the composite should make things work. At least @ivdiazsa was able to get the sdk to function after building it locally. |
Maybe I have misunderstood the fix, I would love to be proven wrong. I will try a quick test with a new aspnet build. |
I tested the latest SDK build and latest aspnet build together and things appear to work. I would like to know what other validation we can do here - does the SDK work when both
|
70bab0e
to
c54271c
Compare
c54271c
to
3ecaa84
Compare
I updated this with the latest dependency flows from installer based on #4532 and updated the test script to construct two versions of the SDK, one based on the runtime and one based on the asp.net composite image. The SDK-on-aspnet-composite image fails to build as described in #4532 (comment), while the SDK-on-runtime image appears to work. We are also able to build the aspnetapp sample on the SDK-on-runtime image and run it on the aspnet composite image. |
It seems this is no longer necessary since #4594 is in good shape. |
@trylek, @ivdiazsa, @davidwrighton, @mangod9, Here is a vertical slice of Debian Bookworm Dockerfiles that you can clone and experiment with. I included a script,
test.ps1
, that builds all of the images in sequence as well as a the aspnet sample for validation.