Skip to content

The JIT compiler encountered invalid IL code or an internal limitation. #105518

@ericstj

Description

@ericstj

Description

Seen here: dotnet/efcore#34278 (comment)

dotnet/efcore#34278 (comment)
https://dev.azure.com/dnceng-public/public/_build/results?buildId=754823&view=results

Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'The JIT compiler encountered invalid IL code or an internal limitation.'.
Stack trace
   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) in D:\a\_work\1\s\src\Microsoft.Data.Sqlite.Core\SqliteException.cs:line 84
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() in D:\a\_work\1\s\src\Microsoft.Data.Sqlite.Core\SqliteDataReader.cs:line 175
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) in D:\a\_work\1\s\src\Microsoft.Data.Sqlite.Core\SqliteCommand.cs:line 312
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) in D:\a\_work\1\s\src\Microsoft.Data.Sqlite.Core\SqliteCommand.cs:line 355
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) in D:\a\_work\1\s\src\EFCore.Relational\Storage\RelationalCommand.cs:line 530
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) in D:\a\_work\1\s\src\EFCore.Relational\Query\Internal\SingleQueryingEnumerable.cs:line 266
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.<>c.<MoveNext>b__21_0(DbContext _, Enumerator enumerator) in D:\a\_work\1\s\src\EFCore.Relational\Query\Internal\SingleQueryingEnumerable.cs:line 199
   at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) in D:\a\_work\1\s\src\EFCore\Storage\NonRetryingExecutionStrategy.cs:line 75
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() in D:\a\_work\1\s\src\EFCore.Relational\Query\Internal\SingleQueryingEnumerable.cs:line 194
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method18058(Closure, QueryContext)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken) in D:\a\_work\1\s\src\EFCore\Query\Internal\QueryCompiler.cs:line 79
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) in D:\a\_work\1\s\src\EFCore\Query\Internal\QueryCompiler.cs:line 60
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) in D:\a\_work\1\s\src\EFCore\Query\Internal\EntityQueryProvider.cs:line 64
   at Microsoft.EntityFrameworkCore.BuiltInDataTypesSqliteTest.Can_query_less_than_of_converted_types() in D:\a\_work\1\s\test\EFCore.Sqlite.FunctionalTests\BuiltInDataTypesSqliteTest.cs:line 1125
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Reproduction Steps

Run EFCore tests with updated runtime. I shared the zip I used for this offline. I wasn't able to distill down the repro from the EFCore tests but maybe someone from EF can cc @maumar

Expected behavior

Tests Pass

Actual behavior

Fail with The JIT compiler encountered invalid IL code or an internal limitation.

Regression?

Yes, from 9df4f7f. #104931

This was reverted in preview7 but remains in main. Main either needs a fix or a revert.

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions