Skip to content

[mono] Force AOT+interpreter for iOSSimulator arm64 library test local build #76551

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

Merged
merged 6 commits into from
Nov 15, 2022

Conversation

mdh1418
Copy link
Member

@mdh1418 mdh1418 commented Oct 3, 2022

When building library tests on iOSSimulator arm64, Thread 6: EXC_BAD_ACCESS (code=1, address=0x0) was being hit at

arm_subx_imm (code, ARMREG_SP, ARMREG_SP, 256);

./build.sh -s mono+libs -os iOSSImulator -arch arm64 -c Debug
./dotnet.sh build /t:Test /p:TargetOS=iOSSimulator /p:TargetArchitecture=arm64 /p:Configuration=Debug src/libraries/System.Buffers/tests

iOSSimulator arm64 doesn't support JIT, so we need to force AOT+interpreter.

This PR does the following to improve local development experience:
Sets RunAOTCompilation to true (if unset) automatically for iOS/tvOS device/sims arm64
Sets MonoForceInterpreter to true (if unset) automatically for iOS/tvOS simulators arm64
Sets MonoAotOption "Interp" if MonoForceInterpreter is set.

Now, contributors can run library tests for iOSlike arm64 platforms without manually specifying RunAOTCompilation=True MonoForceInterpreter=True, making the library testing experience more uniform.

@mdh1418 mdh1418 requested a review from marek-safar as a code owner October 3, 2022 17:53
@ghost ghost assigned mdh1418 Oct 3, 2022
@ghost
Copy link

ghost commented Oct 3, 2022

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

When building library tests on iOSSimulator arm64, Thread 6: EXC_BAD_ACCESS (code=1, address=0x0) was being hit at

arm_subx_imm (code, ARMREG_SP, ARMREG_SP, 256);
.
./build.sh -s mono+libs -os iOSSImulator -arch arm64 -c Debug
./dotnet.sh build /t:Test /p:TargetOS=iOSSimulator /p:TargetArchitecture=arm64 /p:Configuration=Debug src/libraries/System.Buffers/tests

iOSSimulator arm64 doesn't support JIT, so we need to force AOT+interpreter.

This PR sets those two properties by default for library test builds.
It also sets the MonoAotOption "Interp" if MonoForceInterpreter is set.

Author: mdh1418
Assignees: -
Labels:

area-Infrastructure-mono

Milestone: -

@mdh1418 mdh1418 marked this pull request as draft October 3, 2022 17:56
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you plan to update the samples and functional tests too?

@mdh1418 mdh1418 force-pushed the tweak_build_iossimulator_arm64 branch from 3092e86 to 2cb3e28 Compare October 4, 2022 19:02
@build-analysis build-analysis bot mentioned this pull request Oct 6, 2022
2 tasks
@mdh1418 mdh1418 force-pushed the tweak_build_iossimulator_arm64 branch 3 times, most recently from 9ca3960 to f27b1ae Compare October 12, 2022 18:42
@mdh1418 mdh1418 marked this pull request as ready for review October 12, 2022 18:47
@mdh1418 mdh1418 requested a review from steveisok October 12, 2022 18:47
@mdh1418
Copy link
Member Author

mdh1418 commented Oct 13, 2022

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 13, 2022
@steveisok
Copy link
Member

@mdh1418 can you bring this up to date and if it's all good, merge?

@mdh1418 mdh1418 force-pushed the tweak_build_iossimulator_arm64 branch from e6c6c04 to c3926ed Compare November 14, 2022 17:48
@mdh1418
Copy link
Member Author

mdh1418 commented Nov 14, 2022

/azp run runtime-ioslike,runtime-ioslikesimulator

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mdh1418
Copy link
Member Author

mdh1418 commented Nov 14, 2022

I believe from offline discussion, the functional tests usage of RunAOTCompilation and MonoForceInterpreter were specific in testing certain scenarios. It might be better to keep them in.

For the samples, I briefly tried to make some of the samples run on arm64 sim for iOS but it seems to need more for them to work.

As such, I think keeping the scope of this PR to affect running library tests on iOS Arm64 device/sim locally is better for now to get it in.

@mdh1418
Copy link
Member Author

mdh1418 commented Nov 15, 2022

The failing test on iOSlike is filed at #78380

@mdh1418 mdh1418 merged commit 49ac27f into dotnet:main Nov 15, 2022
@mdh1418 mdh1418 deleted the tweak_build_iossimulator_arm64 branch November 15, 2022 14:18
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants