You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[wasm] mono-aot-cross broken on OSX due to System.Threading.AutoreleasePool not found #52718
NSAutoreleasePool instance should be added to all threads. (#52023)
Add an NSAutoreleasePool to all managed create threads including the Main and Finalizer.
This expands the current support where support was only added to ThreadPool threads.
New feature switch was created and the ThreadPool one was removed.
- System.Threading.Thread.EnableAutoreleasePool
Updated AutoReleaseTest for the new scenarios.
Steps to reproduce:
make -C src/mono/sample/wasm/console AOT=1 MSBUILD_ARGS="/fl /flp:v=diag /v:n"
.. fails with:
Wasm.Console.Sample -> /Users/radical/dev/r4/src/mono/sample/wasm/console/bin/browser-wasm/publish/
AOT'ing 7 assemblies
Exit code: 134
/Users/radical/dev/r4/src/mono/wasm/build/WasmApp.targets(145,5): error : Precompiling failed for /Users/radical/dev/r4/src/mono/sample/wasm/console/bin/browser-wasm/publish/System.Console.dll: Error: Process returned non-zero exit code: [/Users/radical/dev/r4/src/mono/sample/wasm/console/Wasm.Console.Sample.csproj]
Looking at the msbuild.log, mono-aot-cross is failing with:
Runtime critical type System.Threading.AutoreleasePool not found
Can either change the load method to "try load from name" and then deal with NULL at the autoreleasepool callsites, or add a && !defined(MONO_CROSS_COMPILING) to the ifdef (that might be the wrong name - sorry I'm on a phone)
Activity
radical commentedon May 13, 2021
cc @AaronRobinsonMSFT @vargaz
AaronRobinsonMSFT commentedon May 13, 2021
@radical Sorry about this. The failing code is at
runtime/src/mono/mono/metadata/domain.c
Lines 368 to 373 in d77854a
Unsure how we need to deal with this. @marek-safar or @lambdageek can you offer a suggestion here?
lambdageek commentedon May 13, 2021
Can either change the load method to "try load from name" and then deal with NULL at the autoreleasepool callsites, or add a
&& !defined(MONO_CROSS_COMPILING)to the ifdef (that might be the wrong name - sorry I'm on a phone)lambdageek commentedon May 13, 2021
"try load from" and check at callsites is probably better. @AaronRobinsonMSFT
AaronRobinsonMSFT commentedon May 13, 2021
@lambdageek Thanks. You've given me more than enough to try and investigate.
AaronRobinsonMSFT commentedon May 13, 2021
@vargaz I see your change and it is partially complete. We should also check and branch here:
runtime/src/mono/mono/metadata/threads.c
Lines 3928 to 3948 in 3659af9
[mono] Fix dotnet#52718.
[mono] Fix #52718. (#52724)