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: add hash and tiering name to assert message #66107

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

AndyAyersMS
Copy link
Member

Now that methods may be jitted multiple times and may have complex names, it is
useful to know their hashes and tiering names as part of asserts.

Now that methods may be jitted multiple times and may have complex names, it is
useful to know their hashes and tiering names as part of asserts.
@ghost ghost assigned AndyAyersMS Mar 2, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 2, 2022
@ghost
Copy link

ghost commented Mar 2, 2022

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

Issue Details

Now that methods may be jitted multiple times and may have complex names, it is
useful to know their hashes and tiering names as part of asserts.

Author: AndyAyersMS
Assignees: AndyAyersMS
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@TIHan PTAL
cc @dotnet/jit-contrib

Sample output (slightly reformatted to better fit github text box)

Assert failure(PID 142148 [0x00022b44], Thread: 131388 [0x2013c]): Assertion failed 'genFuncletInfo.fiSpDelta1 >= -240' 
  in 'TestClass:Method1(byref):S2:this' 
  during 'Generate code' (IL size 387; hash 0x8de95045; Tier1-OSR)

    File: C:\repos\runtime4\src\coreclr\jit\codegenarm64.cpp Line: 1620
    Image: c:\repos\runtime4\artifacts\tests\coreclr\Windows.x64.Checked\Tests\Core_Root\corerun.exe

(aha, this is an OSR issue!)

@BruceForstall
Copy link
Member

I presume those new fields are available at all times (i.e., early enough for the first possible assert)

@AndyAyersMS
Copy link
Member Author

I presume those new fields are available at all times

I think so but haven't verified.

compMethodHash depends on compFullName which we already depend on here; tiering name depends on jit flags.

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Mar 2, 2022

Libraries failure, almost certainly unrelated (#66100)

    System.Reflection.Tests.NullabilityInfoContextTests.NullablePublicOnlyOtherTypesTest [FAIL]
      System.ArgumentNullException : Value cannot be null. (Parameter 'fieldInfo')
      Stack Trace:
           at <PrivateImplementationDetails>.Throw(String paramName)
           at <PrivateImplementationDetails>.ThrowIfNull(Object argument, String paramName)
           at System.Reflection.NullabilityInfoContext.Create(FieldInfo fieldInfo)
        /_/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs(763,0): at System.Reflection.Tests.NullabilityInfoContextTests.NullablePublicOnlyOtherTypesTest()

@stephentoub
Copy link
Member

Libraries failure, almost certainly unrelated (#66100)

Yes, this is widespread now across the repo.

@kunalspathak
Copy link
Member

This could led to stackoverflow if an assert was thrown before setting the minopts flag e.g. JitHashBreak.

#66662 has a fix for this.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 14, 2022
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 this pull request may close these issues.

5 participants