Add Rosetta diagnostics to Apple Helix device jobs#125897
Add Rosetta diagnostics to Apple Helix device jobs#125897vitek-karas wants to merge 2 commits intodotnet:mainfrom
Conversation
Log Rosetta installation and x64 execution checks before Apple device Helix workitems invoke the x64 dotnet-cli, and scope a single ios_arm64 AllSubsets_CoreCLR job to the manual runtime-ioslike pipeline so the diagnostics can be exercised on a PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Tagging subscribers to this area: @akoeplinger, @matouskozak, @simonrozsival |
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds Rosetta/environment diagnostics to Apple device Helix workitems to help diagnose intermittent Bad CPU type in executable failures when the x64 dotnet-cli is invoked on arm64 hosts, and scopes a single ios_arm64 job to the dedicated runtime-ioslike pipeline so the diagnostics can be exercised on PRs without changing default PR validation.
Changes:
- Emit a Rosetta diagnostics shell snippet before running the Helix
dotnet msbuildpublish step for iOS/tvOS device workitems. - Scope
AllSubsets_CoreCLRto run onios_arm64only whenisiOSLikeOnlyBuildis enabled (for theruntime-ioslikepipeline).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/testing/tests.ioslike.targets | Builds a Rosetta diagnostics command and injects it into the Helix AOT build command chain. |
| eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml | Conditionally enables ios_arm64 for the CoreCLR libraries Helix job when running the dedicated iOS-like pipeline. |
| <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/bin/arch -x86_64 /usr/bin/true >/dev/null 2>&1; then echo "x64_exec_works=true"; else echo "x64_exec_works=false"; fi; echo "DOTNET_ROOT=$DOTNET_ROOT"; </_RosettaDiagnosticsCommand> | ||
| <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -n "$DOTNET_ROOT" ] && [ -e "$DOTNET_ROOT/dotnet" ]; then echo "dotnet_host=$DOTNET_ROOT/dotnet"; /usr/bin/file "$DOTNET_ROOT/dotnet" || true; else echo "dotnet_host=missing"; fi; echo "=== End Rosetta diagnostics ==="; </_RosettaDiagnosticsCommand> | ||
|
|
||
| <_AOTBuildCommand>export PATH=$HELIX_CORRELATION_PAYLOAD/build/cmake/cmake-3.28.0-macos-universal/CMake.app/Contents/bin:$PATH && </_AOTBuildCommand> | ||
| <_AOTBuildCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_AOTBuildCommand) $(_RosettaDiagnosticsCommand) && </_AOTBuildCommand> |
There was a problem hiding this comment.
The assembled shell command can become syntactically invalid: _RosettaDiagnosticsCommand ends its last statement with a trailing ; (and earlier fragments also end with ;), but _AOTBuildCommand appends && after the diagnostics. That produces ...; && dotnet msbuild ..., which sh treats as a syntax error and will fail the workitem before the build.
Consider removing the trailing ; from the final diagnostics fragment (and/or ensure the diagnostics string ends with a real command like true), or avoid appending && after the diagnostics and instead have the diagnostics expression itself return success in a way that composes cleanly with &&.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Note
This PR description was AI/Copilot-generated.
Summary
dotnet-cliios_arm64AllSubsets_CoreCLRjob to the dedicatedruntime-ioslikepipeline so the diagnostics can be exercised on a PRWhy
Issue #125826 points to Apple device hosts failing before app build with
Bad CPU type in executable. This PR makes the workitem log:pkgutilRosetta receipt statearch -x86_64success/failureDOTNET_ROOTandfileoutput for the Helixdotnethostsysctl.proc_translatedwhen availableValidation
main:./build.sh clr+libs -lc release -rc checkedeng/testing/tests.ioslike.targetseng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.ymlgit diff --checkCI / How to run
/azp run runtime-ioslike