-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Building a NET6/NET7 iOS project on agent M2 ARM 64 hangs/freezes #8970
Comments
From @rolfbjarne on Thu, 16 Mar 2023 14:40:58 GMT @vincentcastagna have you ever seen this on an M1 machine? or have you never tried on M1? |
From @msftbot[bot] on Thu, 16 Mar 2023 14:42:00 GMT Hi @vincentcastagna. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
From @vincentcastagna on Thu, 16 Mar 2023 15:34:27 GMT
I don't believe we tried on a M1 machine with a .NET6/.NET7 iOS project (only Xamarin.IOS). We will try asap and give feedback here. |
From @vincentcastagna on Thu, 16 Mar 2023 17:27:08 GMT
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
From @vincentcastagna on Mon, 20 Mar 2023 15:07:04 GMT @rolfbjarne We have tested on a M1 machine. The behavior is exactly the same, sometimes it builds successfully, sometimes it just hangs. Seem to be happening half the time, exactly like M2. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
From @vincentcastagna on Wed, 22 Mar 2023 20:42:33 GMT @rolfbjarne Not sure what extra info you would need ? I can provide. I omitted to precise that those agents are fully working on ANY Xamarin project, the build is super fast and never fails. Only our .NET6/.NET7 agents randomly hangs. |
This comment was marked as off-topic.
This comment was marked as off-topic.
From @rolfbjarne on Thu, 23 Mar 2023 08:49:39 GMT @vincentcastagna I'm assuming you only see this when building in Azure DevOps, and never locally? One theory is that something pops up a permission dialog for some reason, and that blocks the build until it times out. Unfortunately these issues can be hard to track down unless you can access the built bot remotely (and catch it when the build is stuck). One idea might be to make the build as verbose as possible, that should pinpoint a bit better exactly where it stops, and this is done by passing /v:diagnostic to the dotnet command:
Could you do this and see what it shows? |
This comment was marked as off-topic.
This comment was marked as off-topic.
From @vincentcastagna on Fri, 24 Mar 2023 17:26:00 GMT @rolfbjarne here logs with /v:diagnostic you can see the instruction at the top of the logs. I don't see a real difference with or without this instruction. I have access to the machine of the agent, and I have never seen a permission dialog poping up though ... even in CLI logs or else. |
From @rolfbjarne on Mon, 27 Mar 2023 15:35:15 GMT
Because right after
|
From @vincentcastagna on Mon, 27 Mar 2023 17:24:31 GMT
Oh my bad, I missunderstood your previous comment, I will provide logs wtih verbosity level set to diagnostic asap. |
From @vincentcastagna on Tue, 28 Mar 2023 19:46:38 GMT @rolfbjarne plz find attached two logs diag level, one hanging, the other successful, needed to zip it as it exceeds file limitation of 25mb |
From @rolfbjarne on Wed, 29 Mar 2023 19:54:33 GMT @vincentcastagna unfortunately that didn't give any new clues. The next I'd try would be:
[1]: can be installed with |
From @vincentcastagna on Fri, 31 Mar 2023 16:56:47 GMT So this is how the ActivityMonitor looks like after 45 min of hanging : I have sampled multiple processes :
|
From @rolfbjarne on Mon, 10 Apr 2023 14:18:06 GMT The
the |
From @vincentcastagna on Tue, 11 Apr 2023 17:00:34 GMT @rolfbjarne I will provide a new pstree and checking that its not truncated. |
From @vincentcastagna on Tue, 11 Apr 2023 18:54:21 GMT @rolfbjarne well I believe its because I did not output to file directly. Please find here the full pstree not truncated. |
From @rolfbjarne on Tue, 11 Apr 2023 19:08:14 GMT I wonder if you're running into this: #6753 Can you try setting |
From @vincentcastagna on Tue, 11 Apr 2023 20:33:14 GMT @rolfbjarne just to be sure Probably more like that, right ? env:
MSBUILDENSURESTDOUTFORTASKPROCESSES: 1 |
From @rolfbjarne on Tue, 11 Apr 2023 20:43:47 GMT
Yes, like that. |
From @vincentcastagna on Wed, 12 Apr 2023 15:18:15 GMT Hey @rolfbjarne so I tried with both, as an msbuild arguments and set in the env, because I'm not sure the dotnet process will capture the env variable, so explicitly passing it probably would ensure that. But in any case, both being set, the behavior remains the same. |
From @rolfbjarne on Wed, 12 Apr 2023 15:26:35 GMT @vincentcastagna can you try passing
|
From @vincentcastagna on Wed, 12 Apr 2023 16:17:56 GMT
I just passed the arguments to dotnet publish, still hanging. Here is pstree output. |
From @vincentcastagna on Wed, 19 Apr 2023 19:38:25 GMT @rolfbjarne any news regarding this ? Can I provide more logs or else to help you investigate this matter. |
From @rolfbjarne on Thu, 20 Apr 2023 16:11:56 GMT @vincentcastagna I'm sorry I didn't answer earlier, but unfortunately I don't have any good ideas. I see you're building the 'Release' configuration, does the same thing happen if you build 'Debug'? If so, one idea might be to turn off LLVM (by setting |
From @vincentcastagna on Tue, 25 Apr 2023 15:22:17 GMT
We already tried deactivating LLVM when I created the issue, but in case, I retried. And the behavior remains the same, sometimes it goes through, sometimes it just hangs. |
From @rolfbjarne on Wed, 26 Apr 2023 07:48:35 GMT
What about a debug build that's not signed, so something like this (i.e.
|
From @filipnavara on Fri, 28 Apr 2023 21:07:04 GMT If you happen to have a way to run something on the machine with the stuck process then |
From @vincentcastagna on Tue, 23 May 2023 18:04:41 GMT I have ran a dotnet stack report -p for each msbuild processes I found running using pstree once a build hangs. I don't see much information here, but hopefully this would be useful to you : @filipnavara I tried to run |
From @filipnavara on Tue, 23 May 2023 18:54:25 GMT Both of the stack traces contain
There are two possible explanations for this. Either I messed up and it's trying to dump itself in a loop, or some process is stuck so badly that not even the diagnostic pipes work. The former is not very likely since I tested that very same command locally. The later would likely imply hitting some .NET runtime bug (and there's only one thread-suspension bug that comes to mind which was fixed in .NET 7 iirc)... |
From @vincentcastagna on Tue, 23 May 2023 19:42:50 GMT Thank you for your quick answer.
As you saw I found two msbuild processes ... could it be that they wait on each other, driving an endless waiting loop. Any advice maybe to try confirm that or seek for other processes that would be waited by msbuild ? I decided to let
I'll also try to target latest .NET 7 |
From @svaldetero on Tue, 27 Jun 2023 20:51:13 GMT I think I'm running into this issue also. I recently moved from microsoft hosted to a self-hosted M2 Max MacStudio. Changing nothing in the pipeline definition, the command line I tried running |
From @rolfbjarne on Wed, 28 Jun 2023 09:04:51 GMT At this point I believe this is either a bug in msbuild or in the runtime, not in any of our MSBuild logic, so I'm moving to dotnet/msbuild. |
We, me and @AR-May, have thoroughly investigated it and it seems that it is hanging in Task I have also notice that, if I read this code correctly, implementation of @rolfbjarne please, if you deem our analysis correct, close this issue and reopen the original one. |
@rokonec thanks a lot for the analysis! That certainly sounds like something that could cause problems, and would be a good fix even if it turns out to not be the actual issue, so I'll go ahead and reopen the other issue. |
From @vincentcastagna on Thu, 16 Mar 2023 14:21:20 GMT
Steps to Reproduce
We don't face the issue on X64 on prem agents or even hosted.
There is no real consistency on when the build will hangs or not. It depends on the run.
We already tried removing Trimmer, which doesn't seem to have any effect. With or without, the behavior is the same.
Expected Behavior
Build should never hang
Actual Behavior
Build hangs sometimes and never ends, until timeout
Environment
AGENT CAPABILITIES :
Build Logs
Working build logs =>
iOS BUILD - OK.txt
Hanging build logs =>
iOS BUILD - HANGS.txt
MSBUILD BINLOG (seem corrupted ...)
build-net7.0-ios.zip
Example Project (If Possible)
https://github.com/nventive/UnoApplicationTemplate/blob/dev/vica/make-usage-new-agents-net7.0/src/app/ApplicationTemplate.Mobile/ApplicationTemplate.Mobile.csproj
Copied from original issue xamarin/xamarin-macios#17825
The text was updated successfully, but these errors were encountered: