Skip to content

Test failure: JIT\Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.cmd #70263

Description

@BruceForstall

runtime-jit-experimental, jit_osr_stress_random

D:\h\w\A6B3094B\w\B97F09EC\e>type D:\h\w\A6B3094B\w\B97F09EC\u\SetStressModes_jitosr_stress_random.cmd 
set COMPlus_TieredCompilation=1
set COMPlus_TC_OnStackReplacement=1
set COMPlus_TC_QuickJitForLoops=1
set COMPlus_TC_OnStackReplacement_InitialCounter=1
set COMPlus_OSR_HitLimit=2
set COMPlus_JitRandomOnStackReplacement=15

D:\h\w\A6B3094B\w\B97F09EC\e>set PATH=D:\h\w\A6B3094B\p\dotnet-cli;C:\python3.9.1\Scripts\;C:\python3.9.1\;C:\python3.7.0\Scripts\;C:\python3.7.0\;D:\Windows\system32;D:\Windows;D:\Windows\System32\Wbem;D:\Windows\System32\WindowsPowerShell\v1.0\;D:\Windows\System32\OpenSSH\;D:\Users\runner\AppData\Local\Microsoft\WindowsApps 

D:\h\w\A6B3094B\w\B97F09EC\e>set DOTNET_ROOT=D:\h\w\A6B3094B\p\dotnet-cli 

D:\h\w\A6B3094B\w\B97F09EC\e>set DOTNET_CLI_TELEMETRY_OPTOUT=1 

D:\h\w\A6B3094B\w\B97F09EC\e>set DOTNET_CLI_HOME=D:\h\w\A6B3094B\w\B97F09EC\e\.dotnet 

D:\h\w\A6B3094B\w\B97F09EC\e>set NUGET_PACKAGES=D:\h\w\A6B3094B\w\B97F09EC\e\.nuget 

D:\h\w\A6B3094B\w\B97F09EC\e>dotnet D:\h\w\A6B3094B\p\xunit\xunit.console.dll JIT\Regression\JIT.Regression.XUnitWrapper.dll -parallel collections -nocolor -noshadow -xml testResults.xml -trait TestGroup=JIT.Regression.JitBlue 
Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 7.0.0-preview.3.22175.4)
  Discovering: JIT.Regression.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  JIT.Regression.XUnitWrapper (found 227 of 1601 test cases)
  Starting:    JIT.Regression.XUnitWrapper (parallel test collections = on, max threads = 8)
    JIT\Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.cmd [FAIL]
      
      Return code:      1
      Raw output file:      D:\h\w\A6B3094B\w\B97F09EC\uploads\Reports\JIT.Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.output.txt
      Raw output:
      BEGIN EXECUTION
       "D:\h\w\A6B3094B\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  GitHub_21990.dll 
      Expected: 100
      Actual: -1073741819
      END EXECUTION - FAILED
      FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=D:\h\w\A6B3094B\p
      > D:\h\w\A6B3094B\w\B97F09EC\e\JIT\Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.cmd
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Regression._JitBlue_GitHub_21990_GitHub_21990_GitHub_21990_._JitBlue_GitHub_21990_GitHub_21990_GitHub_21990_cmd()
      Output:
        
        Return code:      1
        Raw output file:      D:\h\w\A6B3094B\w\B97F09EC\uploads\Reports\JIT.Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.output.txt
        Raw output:
        BEGIN EXECUTION
         "D:\h\w\A6B3094B\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  GitHub_21990.dll 
        Expected: 100
        Actual: -1073741819
        END EXECUTION - FAILED
        FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=D:\h\w\A6B3094B\p
        > D:\h\w\A6B3094B\w\B97F09EC\e\JIT\Regression\JitBlue\GitHub_21990\GitHub_21990\GitHub_21990.cmd
  Finished:    JIT.Regression.XUnitWrapper
=== TEST EXECUTION SUMMARY ===
   JIT.Regression.XUnitWrapper  Total: 227, Errors: 0, Failed: 1, Skipped: 0, Time: 23.349s

https://dev.azure.com/dnceng/public/_build/results?buildId=1807282&view=ms.vss-test-web.build-test-results-tab

Activity

  1. added
    JitStressCLR JIT issues involving JIT internal stress modes
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Jun 5, 2022
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jun 5, 2022
  3. AndyAyersMS commented on Jun 6, 2022

    @AndyAyersMS
    Member

    See #65903 (comment)

    This test creates a huge OSR method funclet frame. Recall on Arm64 OSR funclets need to pad by the size of the Tier0 frame, to keep PSPSym offsets the same between funclet and OSR method. Here the Tier0 frame is huge, and so forces the OSR funclet to likewise have a huge frame, and so unfortunately it also then needs a stack probe.

    I was hoping to fix this by moving the Arm64 PSPSym above the register saves area which would make the offset in the OSR method small. But this seems less feasible now.

    Thinking about this again I wonder if the OSR method can just reuse the Tier0 PSPSym slot. It shouldn't be possible for the OSR method to need a PSPSym if the Tier0 method didn't have one (at least until we enable inlining of methods with EH). So that slot in the Tier0 frame is just sitting there unused, and the OSR method could co-opt it.

    That would make the OSR method caller-SP relative PSPSym offset very low, and so the OSR funclets could stop this crazy padding.

  4. BruceForstall commented on Jun 7, 2022

    @BruceForstall
    ContributorAuthor

    and so unfortunately it also then needs a stack probe.

    This is in addition to the normal funclet stack probe that already exists to support a large outgoing arg area?

  5. AndyAyersMS commented on Jun 7, 2022

    @AndyAyersMS
    Member

    and so unfortunately it also then needs a stack probe.

    This is in addition to the normal funclet stack probe that already exists to support a large outgoing arg area?

    Not sure? I need to take a fresh look at this.

  6. removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 8, 2022
  7. added this to the 7.0.0 milestone on Jun 8, 2022
  8. AndyAyersMS commented on Jun 17, 2022

    @AndyAyersMS
    Member

    Current OSR funclet prolog is

    ;; Test_GitHub_21990:TestGenericContext(int):int
    
    IN0045: 00010C                    mov     x9, #0x9ce0
    IN0046: 000110                    sub     sp, sp, x9
    IN0047: 000114                    stp     fp, lr, [sp]
    IN0048: 000118                    stp     x19, x20, [sp,#32]
    IN0049: 00011C                    mov     x2, #0x9ce0
    IN004a: 000120                    add     x3, fp, x2
    IN004b: 000124                    str     x3, [sp,#24]

    Could be I'm abusing the frame style here. and while the OSR method can have a type 1 (or whatever style) as the "probing" happens in the Tier0 frame and it is inheriting the T0 SP, but the funclet needs to do its own probing to skip over the ginormous padding it needs to ensure the PSP sym is at the right caller-SP relative offset.

    I think reusing T0 PSP slot in the OSR method is the right long-term solution, but it means that the OSR method, OSR funclet and Tier0 method have to agree on the size of the save area (since the PSP sym sits below this), which means that T0 needs to reserve a maximal save area, which means we need to have the OSR method share this save area like we do on x64.

    Doing all that now seems perhaps complicated, so I'll look into doing probing first.

  9. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 17, 2022
  10. BruceForstall commented on Jun 17, 2022

    @BruceForstall
    ContributorAuthor

    OSR funclets are the only case where we might need probing of the initial SP adjustment, as you mentioned in a comment in genFuncletProlog:

            // With OSR we may see large values for fiSpDelta1
            // (we really need to probe the frame, sigh)
    
  11. added a commit that references this issue on Jun 22, 2022
    1b8006f
  12. added a commit that references this issue on Jun 23, 2022
    95d64e8
  13. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 23, 2022
  14. ghost locked as resolved and limited conversation to collaborators on Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

JitStressCLR JIT issues involving JIT internal stress modesarea-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