-
Notifications
You must be signed in to change notification settings - Fork 253
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
dotnet restore (from nuget) doesn't complete on M1 mac #12329
Comments
Thank you for filing this issue. If above work, then try with simple bare minimum asp.net project. |
Restore seems to work fine in all cases when not building for docker. I believe it is when trying to build for x86 docker images that the issue occurs. I created a new asp.net 7 web app. I did right click on the project and added docker support. I then went to a terminal and did docker-compose build. This works. Then I add the following line to the docker-compose.yml file:
Then I do docker-compose build again and it has the issue. I need that line because Azure requires x86 linux containers, so I have to force the output image to be amd64. If I don't then the resulting image is for arm and won't run on Azure. Here is the full docker-compose file:
|
Could we be able to share us |
It is probably just as easy for you to create a new one. I didn't change anything in the project except adding that line in the docker-compose.yml file. It might even validate that it happens for everyone. If you are not able to then I will go through all the files and remove any personal information and upload it. Thank you for helping out. |
Docker is not our expertise, we might miss out something from repro. If you could provide us repro code, then it would be easier for us to diagnose. |
Ok. I uploaded the example: https://github.com/tpitman/NugetDotnetRestoreTest It will work fine on an Intel Mac. You will need to do the docker-compose build on an M1 Mac. The issue is completely related to trying to build on M1 mac to Linux container that targets Intel processors. |
Sorry, currently many folks are OOF due to holiday. We need to wait another 1-2 weeks before we can do anything about it. |
I understand. I can get by by using my Intel mac. Means having to carry around 2, but hopefully you guys will get it figured out soon after the holidays. |
I am seeing the same issue on M1. |
Nobody has copied the error message in this issue. I don't have any Mac, let alone a M1 Mac. Is it the same error as #12227? Although it seems like that error might be due to qemu, rather than ARM more generally. |
There isn't an error that I have seen. The dotnet restore step just keeps going. I let it go for 10 minutes before giving up. It is possible that if I let it go long enough maybe it would give an error. I am also not sure whether they are related because I don't think I am using buildx. I am just running docker-compose build and don't see it reference buildx anywhere. |
Can you use If |
This is a docker container coming directly from mcr.microsoft.com/dotnet/sdk:7.0. There doesn't seem to be any other users. This works fine when building for ARM on the M1 or when building for Intel on and Intel. |
I have done some more testing. dotnet nuget --version works without making any changes to the HOME env variable. dotnet nuget restore still hangs even after setting HOME to something other than /root |
Note that when I found this "fix", I was using SDK version 7.0.102. |
I too saw a post about this being fixed in 7.0.102, but my testing has not confirmed that. I added code to the example project that output the version using dotnet --version, it showed 7.0.102, but still hung up on the dotnet restore command. If someone else can take the example project mentioned above and have it work on an M1 mac and give details, I would love to see it. |
I retract my previous statement - both your sample project and mine hang as before. Not sure how I fooled myself, but anyway... back to square one. |
Sorry to hear that. I was really hoping it was just something I was doing different. Thank you for helping.... |
@joergjo - Can you please capture dump of the running process (using dotnet-dump command) on docker environment? I am only interested in the call stack that is causing restore to wait indefinitely. |
@tpitman - Good to know. In your sample repo, I see that Would it be possible to add a package reference to a package (for example Newtonsoft.Json from nuget.org) and see if restore succeeds?
or update csproje file as shown below.
|
That did not make any difference that I could tell. It still didn't proceed to do anything. Good idea, though :-). |
I just tried this (hopefully I did it correctly) and I think I also hit the hang:
I am on a MacBook Pro M1 machine with the "Apple Chip" version of Docker installed (by default, when you go to the Download section of Docker's website, it offers you the x64 version - you have to specifically click the "Apple Chip" link below the big "Download" button). I also modified the Docker file to use
What I can say is that if I use a bogus verbosity level, the
Not sure if that information is helpful or not, but maybe it helps determine if the issue is the dotnet program itself hanging at startup vs the dotnet program hanging trying to restore a project. |
@jstedfast - Thank you for taking the time to reproduce this issue. Can you please follow the steps suggested in dotnet/dotnet-docker#4285 (reply in thread) and dotnet/dotnet-docker#4285 (reply in thread) and provide us with the call stack that is causing this issue? |
I couldn't figure out how to get dotnet-dump working for this yesterday and have to get back to other tasks, but if someone can provide me with a clearer set of instructions, I can give it another try. |
Sorry for getting back this issue late. I was busy with other stuff, also don't have MAC M1 machine, catching up today. @tpitman |
After playing for while with
Stack trace details
Succesful run details
@aortiz-msft @rainersigwald Update 1/26/2023: |
@erdembayar I think this can be closed since it's pretty well tracked by #12227, dotnet/runtime#13648, and https://gitlab.com/qemu-project/qemu/-/issues/249. |
Based on @rainersigwald comment we can close it, it's tracked by other issues. |
NuGet Product Used
dotnet.exe
Product Version
dotnet: 7.0.1, arm64 - msbuild: 16.10.1. nuget. Not sure, this gets executed inside of a docker-compose linux build.
Worked before?
Worked in net6
Impact
I'm unable to use this version
Repro Steps & Context
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: