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

MacCatalyst arm64 AOT JustInterp fails on CI #53106

Closed
steveisok opened this issue May 21, 2021 · 2 comments · Fixed by #53197
Closed

MacCatalyst arm64 AOT JustInterp fails on CI #53106

steveisok opened this issue May 21, 2021 · 2 comments · Fixed by #53197
Assignees
Milestone

Comments

@steveisok
Copy link
Member

The PR #52848 fails on CI for MacCatalyst arm64 with the following errors:

2021-05-21T18:14:49.5722200Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error : dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5726950Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np
2021-05-21T18:14:49.5730120Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error : dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5733840Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np
2021-05-21T18:14:49.5737030Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0) [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5741520Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0)
2021-05-21T18:14:49.5744520Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0) [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5749410Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0)
2021-05-21T18:14:49.5753800Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Expected in: /usr/lib/libSystem.B.dylib [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5760900Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Expected in: /usr/lib/libSystem.B.dylib
2021-05-21T18:14:49.5766330Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Expected in: /usr/lib/libSystem.B.dylib [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]

https://dev.azure.com/dnceng/public/_build/results?buildId=1149175&view=logs&j=40dd5e69-573f-523b-e7f8-782d9174245a&t=da98d7ae-a26f-527f-9fe1-6478a56930b6

Interesting to note that it works locally on both x64 and m1. I wonder if the xcode version is the problem here?

/cc @lambdageek @vargaz

@ghost
Copy link

ghost commented May 21, 2021

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

Issue Details

The PR #52848 fails on CI for MacCatalyst arm64 with the following errors:

2021-05-21T18:14:49.5722200Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error : dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5726950Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np
2021-05-21T18:14:49.5730120Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error : dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5733840Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_np
2021-05-21T18:14:49.5737030Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0) [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5741520Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0)
2021-05-21T18:14:49.5744520Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0) [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5749410Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Referenced from: /Users/runner/work/1/s/artifacts/bin/mono/MacCatalyst.arm64.Release/cross/maccatalyst-arm64/mono-aot-cross (which was built for Mac OS X 11.0)
2021-05-21T18:14:49.5753800Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Expected in: /usr/lib/libSystem.B.dylib [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]
2021-05-21T18:14:49.5760900Z ##[error]eng/testing/tests.mobile.targets(183,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build)   Expected in: /usr/lib/libSystem.B.dylib
2021-05-21T18:14:49.5766330Z /Users/runner/work/1/s/eng/testing/tests.mobile.targets(183,5): error :   Expected in: /usr/lib/libSystem.B.dylib [/Users/runner/work/1/s/src/libraries/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj]

https://dev.azure.com/dnceng/public/_build/results?buildId=1149175&view=logs&j=40dd5e69-573f-523b-e7f8-782d9174245a&t=da98d7ae-a26f-527f-9fe1-6478a56930b6

Interesting to note that it works locally on both x64 and m1. I wonder if the xcode version is the problem here?

/cc @lambdageek @vargaz

Author: steveisok
Assignees: -
Labels:

area-Infrastructure-mono

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label May 21, 2021
@steveisok steveisok added this to the 6.0.0 milestone May 21, 2021
@lambdageek lambdageek self-assigned this May 26, 2021
@lambdageek
Copy link
Member

Should be fixed by #53197

@akoeplinger akoeplinger added area-Codegen-AOT-mono and removed area-Infrastructure-mono untriaged New issue has not been triaged by the area owner labels Jun 2, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 2, 2021
lambdageek added a commit that referenced this issue Jun 2, 2021
…t CI to JustInterp AOT mode (#53197)

* Initial pass at trying to run catalyst in aot interp only mode

* Cleanup

* Remove yml dup

* Incorporate changes and identify native libraries to skip during System.Diagnostics.FileVersionInfo test run

* [mini] Add a no-exec code manager for AOT compilation

   Don't allocate pages with execute permission if we're never going to be executing code.  Also don't try to toggle per-thread write protection if we're not expecting to write to executable pages.

* also set no_exec earlier and create the ALC codeman with noexec

* Don't assert on Catalyst in mono_codeman_enable_write

   We defensively also toggle the page write protect bits when resolving some AOT patch targets in mono_resolve_patch_target_ext.  Instead allow the call, but don't do anything.

* Set ENABLE_MONOTOUCH for MacCatalyst arm64.  Define MONOTOUCH in one place

* [aot] mscorlib.dll isn't CoreLib on netcore

   It's a forwarding assembly.  Don't treat it specially

* [testing] In JustInterp mode, only AOT System.Private.CoreLib

   We only need to AOT the trampolines in System.Private.CoreLib in interpreter-only mode.  We don't need to AOT any of the user code in other assemblies.

   Side effect: fixes the System.Runtime.Loader.DefaultContext testsuite in JustInterp mode.  Still broken in Full AOT mode. (That testsuite references the System.Runtime.Loader.Noop.Assembly assembly, but with a different filename
System.Runtime.Loader.Noop.Assembly_test.dll which causes linking errors due to incorrect symbols in AOT module registration in AppleAppBuilder)

* Update iOS sample to use JustInterp

   and adhoc signing

* Don't run iOS sample on the CI build machine

* Disable some tests

Fixes #53106

Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Steve Pfister <[email protected]>
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 2, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants