Skip to content
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

[BUG]: Self-hosted agent on M2 hangs when building MAUI on NET6 / NET7 / NET8 #4546

Closed
1 of 4 tasks
svaldetero opened this issue Nov 28, 2023 · 3 comments
Closed
1 of 4 tasks

Comments

@svaldetero
Copy link

svaldetero commented Nov 28, 2023

What happened?

Previously following xamarin/xamarin-macios#17825 but can't update it since I'm not a collaborator. Also related #4205
This has been an issue on NET 6 & NET 7. I just upgraded to NET 8 since it released and the above bug has been fixed, however I still have the issue. Corresponding macios bug: xamarin/xamarin-macios#19547

Kicking off a dotnet publish for a NET 8 Maui ios app, hangs forever. Opening a terminal on the mac, pasting the exact line, and executing it in the agent's folder, runs fine.

Command

dotnet publish 'Maui.csproj' -f net8.0-ios --self-contained -r ios-arm64 -c Release -p:BuildIpa=True -p:ApplicationId=com.app.dev /p:ApplicationVersion=61217 /p:ApplicationDisplayVersion=0.1.31 /p:ApplicationTitle='AppDevTemplate Dev'

Hardware

  Model Name: Mac Studio
Model Identifier: Mac14,13
Model Number: Z17Z000JXLL/A
Chip: Apple M2 Max
Total Number of Cores: 12 (8 performance and 4 efficiency)
Memory: 64 GB

Agent Capabilities

Name Value
clang /usr/bin/clang
curl /usr/bin/curl
docker /usr/local/bin/docker
dotnet /usr/local/share/dotnet/dotnet
git /usr/bin/git
HOME /Users/envocadmin
InteractiveSession False
java /usr/bin/java
JAVA_HOME $(/usr/libexec/java_home)
JAVA_HOME_11_X64 /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home
JDK /usr/bin/javac
LANG en_US.UTF-8
LOGNAME envocadmin
make /usr/bin/make
MSBuild /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild
PATH /usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/envocadmin/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/bin
PWD /Users/Shared/Agents/Agent2
python3 /usr/bin/python3
rake /usr/bin/rake
ruby /usr/bin/ruby
SDKMANAGER $ANDROID_HOME/cmdline-tools/7.0/bin/sdkmanager
sh /bin/sh
SHELL /bin/zsh
SSH_AUTH_SOCK /private/tmp/com.apple.launchd.fZyAVo93Zs/Listeners
TMPDIR /var/folders/xk/7mssnqbd0v5f_z1fwblvmw1m0000gn/T/
USER envocadmin
VSTS_AGENT_SVC 1
Xamarin.Android /Library/Frameworks/Xamarin.Android.framework/Versions/Current/Version
Xamarin.iOS /Applications/Visual Studio.app/Contents/MacOS/vstool
xcode /Applications/Xcode.app/Contents/Developer
XPC_FLAGS 0x0
XPC_SERVICE_NAME 0
 
Let me know if I can email you diagnostic logs or the link to the build definition. I'd prefer not to post the whole logs here.

Versions

Agent version: 3.230.0
macOS: 13.6
.NET: 8.0.100
Microsoft.Maui.Sdk: 8.0.3
Microsoft.iOS.Sdk: 17.0.8478

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

macOS Ventura 13.6.1

Version controll system

Git on Azure Devops

Relevant log output

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.
/Users/envocadmin/.nuget/packages/xamarin.firebase.ios.core/8.10.0.3/lib/net6.0-ios15.4/Firebase.Core.resources/GoogleUtilitiesComponents.xcframework/ios-arm64/GoogleUtilitiesComponents.framework/GoogleUtilitiesComponents : warning MT7091: The framework /Users/envocadmin/.nuget/packages/xamarin.firebase.ios.core/8.10.0.3/lib/net6.0-ios15.4/Firebase.Core.resources/GoogleUtilitiesComponents.xcframework/ios-arm64/GoogleUtilitiesComponents.framework is a framework of static libraries, and will not be copied to the app. [/Users/Shared/Agents/Agent2/_work/9/s/Mobile/src/Maui/EnvocTemplate.AppDevTemplate.Maui.csproj::TargetFramework=net8.0-ios]
/Users/envocadmin/Library/Caches/XamarinBuildDownload/FAnlytcs-8.9.1/FirebaseAnalytics-8.9.1/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework/FirebaseAnalytics : warning MT7091: The framework /Users/envocadmin/Library/Caches/XamarinBuildDownload/FAnlytcs-8.9.1/FirebaseAnalytics-8.9.1/Frameworks/FirebaseAnalytics.xcframework/ios-arm64_armv7/FirebaseAnalytics.framework is a framework of static libraries, and will not be copied to the app. [/Users/Shared/Agents/Agent2/_work/9/s/Mobile/src/Maui/EnvocTemplate.AppDevTemplate.Maui.csproj::TargetFramework=net8.0-ios]
/Users/envocadmin/Library/Caches/XamarinBuildDownload/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement : warning MT7091: The framework /Users/envocadmin/Library/Caches/XamarinBuildDownload/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework is a framework of static libraries, and will not be copied to the app. [/Users/Shared/Agents/Agent2/_work/9/s/Mobile/src/Maui/EnvocTemplate.AppDevTemplate.Maui.csproj::TargetFramework=net8.0-ios]
##[debug]Re-evaluate condition on job cancellation for step: 'Publish iOS'.
##[debug]Started cancellation of executing script
##[debug]Exit code null received from tool '/bin/bash'
##[error]The operation was canceled.
##[debug]System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /Users/runner/work/1/s/src/Agent.Sdk/ProcessInvoker.cs:line 376
   at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /Users/runner/work/1/s/src/Microsoft.VisualStudio.Services.Agent/ProcessInvoker.cs:line 308
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in /Users/runner/work/1/s/src/Agent.Worker/Handlers/StepHost.cs:line 76
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.RunAsync() in /Users/runner/work/1/s/src/Agent.Worker/Handlers/NodeHandler.cs:line 212
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync() in /Users/runner/work/1/s/src/Agent.Worker/TaskRunner.cs:line 407
   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken) in /Users/runner/work/1/s/src/Agent.Worker/StepsRunner.cs:line 238
Finishing: Publish iOS
@aleksandrlevochkin
Copy link
Contributor

Hi @svaldetero thank you for reporting this issue. We're working on higher-prioritized issues at the moment, but we will get back to this one as soon as we can.

Copy link

This issue has had no activity in 180 days. Please comment if it is not actually stale

@github-actions github-actions bot added the stale label May 27, 2024
@svaldetero
Copy link
Author

The underlying issue appeared to be microsoft/azure-pipelines-tasks#19174. This issue can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants