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

JIT assertion failure when running tests in OSX #40195

Closed
eiriktsarpalis opened this issue Jul 31, 2020 · 7 comments · Fixed by #40434
Closed

JIT assertion failure when running tests in OSX #40195

eiriktsarpalis opened this issue Jul 31, 2020 · 7 comments · Fixed by #40434
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@eiriktsarpalis
Copy link
Member

I'm seeing the following assertion failure when running a new set of tests in Coreclr OSX x64 Debug:

Assert failure(PID 82341 [0x000141a5], Thread: 933639 [0xe3f07]): Assertion failed 'tree->AsField()->gtFldObj == nullptr' in 'elems@20:Close():this' during 'Update flow graph early pass' (IL size 133)

    File: /Users/runner/work/1/s/src/coreclr/src/jit/flowgraph.cpp Line: 19214
    Image: /private/tmp/helix/working/A9D5098C/p/dotnet

The issue seems to reproduce consistently (I triggered CI twice) and only happens in OSX. I don't currently have access to an OSX device, so wasn't able to further drill down into the problem.

Relevant PR: #40135 (comment) cc @kunalspathak

@eiriktsarpalis eiriktsarpalis added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 31, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jul 31, 2020
@kunalspathak
Copy link
Member

@dotnet/jit-contrib , @erozenfeld

@AndyAyersMS AndyAyersMS removed the untriaged New issue has not been triaged by the area owner label Jul 31, 2020
@AndyAyersMS AndyAyersMS added this to the 5.0.0 milestone Jul 31, 2020
@AndyAyersMS
Copy link
Member

Marking as 5.0.

@erozenfeld
Copy link
Member

erozenfeld commented Aug 1, 2020

This assert also fires when running Windows x64 pmi on FSharp.Core.dll:

F:\runtime3\artifacts\tests\coreclr\Windows_NT.x64.checked\Tests\Core_Root\CoreRun.exe C:\jitutils\bin\pmi.dll PREPALL-QUIET F:\runtime1\artifacts\tests\coreclr\Windows_NT.x64.Release\Tests\Core_Root\FSharp.Core.dll

Assert failure(PID 48636 [0x0000bdfc], Thread: 57452 [0xe06c]): Assertion failed 'tree->AsField()->gtFldObj == nullptr' in 'System-Collections-Generic-IReadOnlyDictionary-2-get_Keys@676[__Canon,Int64][System.__Canon,System.Int64]:Close():this' during 'Update flow graph early pass' (IL size 135)

    File: F:\runtime3\src\coreclr\src\jit\flowgraph.cpp Line: 19214
    Image: F:\runtime3\artifacts\tests\coreclr\Windows_NT.x64.checked\Tests\Core_Root\CoreRun.exe

@AndyAyersMS
Copy link
Member

I'll take a look.

@AndyAyersMS AndyAyersMS self-assigned this Aug 5, 2020
@AndyAyersMS
Copy link
Member

Think the repro is an object field feeding a degenerate switch. Haven't tracked down the source yet; based on IL, trying to come up with some simple C# for this. Roslyn is surprisingly aggressive at turning switches into if then trees. Seems like perhaps way too aggressive.

@AndyAyersMS
Copy link
Member

The method being jitted in CI also comes from FSharp.Core.dll, issue looks similar... we are not properly handling a switch flow opt that happens before statement lists are threaded. Fix seems simple.

AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this issue Aug 6, 2020
Don't try rethreading statement lists if we're doing and early flow opt.

Fixes dotnet#40195.
@eiriktsarpalis
Copy link
Member Author

I'm curious though why CI only surfaced this issue in OSX builds?

AndyAyersMS added a commit that referenced this issue Aug 6, 2020
Don't try rethreading statement lists if we're doing and early flow opt.

Fixes #40195.
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this issue Aug 10, 2020
…#40434)

Don't try rethreading statement lists if we're doing and early flow opt.

Fixes dotnet#40195.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants