Skip to content

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

Closed

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

Activity

  1. ghost added
    needs-area-label
    on Jul 25, 2024
  2. added
    untriaged
    on Jul 25, 2024
  3. self-assigned this
    on Jul 25, 2024
  4. added
    area-CodeGen-coreclr
    and removed
    untriaged
    on Jul 25, 2024
  5. added this to the 9.0.0 milestone on Jul 25, 2024
  6. removed
    needs-area-label
    on Jul 25, 2024
  7. dotnet-policy-service commented on Jul 25, 2024

    @dotnet-policy-service
    Contributor

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

  8. EgorBo commented on Jul 25, 2024

    @EgorBo
    Member

    I can repro this issue on release-9.0 P7, but not on Main, checking what has fixed it

  9. AndyAyersMS commented on Jul 26, 2024

    @AndyAyersMS
    Member

    Did you figure out what was going on in P7?

  10. EgorBo commented on Jul 26, 2024

    @EgorBo
    Member

    Did you figure out what was going on in P7?

    I was wrong, it reproduces on main as well, I attached a minimal repro in #105529

  11. locked and limited conversation to collaborators on Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions