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

Pmi run on some test dll-s hits some jit asserts. #39556

Closed
sandreenko opened this issue Jul 17, 2020 · 9 comments · Fixed by #39621
Closed

Pmi run on some test dll-s hits some jit asserts. #39556

sandreenko opened this issue Jul 17, 2020 · 9 comments · Fixed by #39621
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI bug
Milestone

Comments

@sandreenko
Copy link
Contributor

sandreenko commented Jul 17, 2020

I was running PMI on test using a command like this:

jit-diff.bat  diff  -b "D:\Sergey\git\runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\Tests\Core_Root"  --output D:\Sergey\diffs --core_root D:\Sergey\git\runtime\artifacts\tests\coreclr\Windows_NT.x64.Release\Tests\Core_Root --pmi --tests --test_root D:\Sergey\git\runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked

and has hit many failures: Warning: Failures detected generating asm: 36, for example,
corerun pmi.dll PrepAll runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\JIT\Regression\CLR-x86-JIT\V1.2-Beta1\b210352\csharpgenerictypes\csharpgenerictypes.dll fails with:

PREPALL type# 1 method# 56 GenericClass`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]::StaticGenericMethodUsesClassTypeParam

Assert failure(PID 28340 [0x00006eb4], Thread: 68064 [0x109e0]): Assertion failed 'typeClass != nullptr' in 'ILStubClass:IL_STUB_InstantiatingStub(System.Object,System.Numerics.Vector`1[Single],System.Type):System.Numerics.Vector`1[Single]' during 'Importation' (IL size 27)

    File: D:\Sergey\git\runtime\src\coreclr\src\jit\compiler.hpp Line: 704
    Image: D:\Sergey\git\runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\Tests\Core_Root\CoreRun.exe

with stack like:

>	clrjit.dll!Compiler::VarTypeIsMultiByteAndCanEnreg(var_types type, CORINFO_CLASS_STRUCT_ * typeClass, unsigned int * typeSize, bool forReturn, bool isVarArg) Line 705	C++
 	clrjit.dll!Compiler::impTailCallRetTypeCompatible(var_types callerRetType, CORINFO_CLASS_STRUCT_ * callerRetTypeClass, var_types calleeRetType, CORINFO_CLASS_STRUCT_ * calleeRetTypeClass) Line 7388	C++
 	clrjit.dll!Compiler::impImportCall(opcode_t opcode, CORINFO_RESOLVED_TOKEN * pResolvedToken, CORINFO_RESOLVED_TOKEN * pConstrainedResolvedToken, GenTree * newobjThis, int prefixFlags, CORINFO_CALL_INFO * callInfo, unsigned int rawILOffset) Line 8578	C++

Has anybody seen this behaviour? Is it expected or jit or pmi issue? @dotnet/jit-contrib

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

I haven't seen that behavior - I think the last time I ran PMI diffs was probably more than a week ago, though.

@kunalspathak
Copy link
Member

Same here - I ran pmi with altjit yesterday and didn't see anything like that.

@sandreenko
Copy link
Contributor Author

sandreenko commented Jul 17, 2020

@CarolEidt @kunalspathak were you running pmi on tests?

@CarolEidt
Copy link
Contributor

I usually just run it on frameworks and benchmarks (since it's kind of slow)

@sandreenko
Copy link
Contributor Author

I usually just run it on frameworks and benchmarks (since it's kind of slow)

I see this issue only with tests, benchmarks and frameworks are passing for me as well.

Could you please try to run corerun pmi.dll PrepAll runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\JIT\Regression\CLR-x86-JIT\V1.2-Beta1\b210352\csharpgenerictypes\csharpgenerictypes.dll and see if it asserts for you or not?

@kunalspathak
Copy link
Member

Could you please try to run corerun pmi.dll PrepAll runtime\artifacts\tests\coreclr\Windows_NT.x64.Checked\JIT\Regression\CLR-x86-JIT\V1.2-Beta1\b210352\csharpgenerictypes\csharpgenerictypes.dll and see if it asserts for you or not?

Worked for me.

@sandreenko
Copy link
Contributor Author

Thanks Kunal, I will try to do a clean build/update jitutils and see if that fixes this for me.

@sandreenko
Copy link
Contributor Author

Interesting, it is working for me with SHA that you gave me (10 days old), I will search when it stopped working, maybe my local changes.

@BruceForstall BruceForstall added this to the 5.0.0 milestone Jul 18, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Jul 18, 2020
@sandreenko
Copy link
Contributor Author

Found the issue and probably a fix, it started to fail after #37745.

@sandreenko sandreenko self-assigned this Jul 18, 2020
@sandreenko sandreenko added the bug label Jul 18, 2020
@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 bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants