dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.56k stars 4.54k forks source link

[mono] Failure LambdaCompilerAot tests due to attempts of JIT compiling method while in aot-only mode. #104431

Open matouskozak opened 3 days ago

matouskozak commented 3 days ago

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=716252 Build error leg or test failing: iOS.Simulator.LambdaCompilerAot.Test Affected CI: maccatalyst_[x64/arm64]_release_allsubsets_mono, iossimulator_x64_release_allsubsets_mono (runtime-extra-platforms) Range of commits: https://github.com/dotnet/runtime/compare/42ade705...ceb0a16a

Stack trace example from iOSSimulator job:

2024-07-03 19:34:42.254 I  iOS.Simulator.LambdaCompilerAot.Test[455:11b63a] Unhandled managed exceptions:
Attempting to JIT compile method '(wrapper dynamic-method) string object:lambda_method1 (System.Runtime.CompilerServices.Closure)' while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.
 (System.ExecutionEngineException)
   at System.Delegate.CreateDelegate(Type , Object , MethodInfo , Boolean , Boolean )
   at System.Delegate.CreateDelegate(Type , Object , MethodInfo , Boolean )
   at System.Delegate.CreateDelegate(Type , Object , MethodInfo )
   at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type , Object )
   at System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate()
   at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression )
   at System.Linq.Expressions.Expression`1[[System.Func`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Compile()
   at System.Linq.EnumerableExecutor`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Execute()
   at System.Linq.EnumerableQuery`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].System.Linq.IQueryProvider.Execute[String](Expression )
   at System.Linq.Queryable.First[String](IQueryable`1 source)
   at Program.Main(String[] )
   at Program.<Main>(String[] )
2024-07-03 19:34:42.255 I  iOS.Simulator.LambdaCompilerAot.Test[455:11b63a] DOTNET.APP_EXIT_CODE: 1

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorPattern": "Detected exit code 1 from .*iOS\\.Simulator\\.LambdaCompilerAot\\.Test\\.log",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=716252 Error message validated: [Detected exit code 1 from .*iOS\.Simulator\.LambdaCompilerAot\.Test\.log] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 7/4/2024 12:17:18 PM UTC

Report

Build Definition Test Pull Request
716252 dotnet/runtime iOS.Simulator.LambdaCompilerAot.Test.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 1
dotnet-policy-service[bot] commented 3 days ago

Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.

dotnet-policy-service[bot] commented 3 days ago

Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.

matouskozak commented 3 days ago

Could it be introduced by https://github.com/dotnet/runtime/pull/103777 @steveisok or does the change only affected NAOT?

steveisok commented 3 days ago

Could it be introduced by https://github.com/dotnet/runtime/pull/103777 @steveisok or does the change only affected NAOT?

It only impacted nativeaot. It was really specific. If you had the mono library builder workload installed and you tried to build a static/shared library with nativeaot, you couldn't.