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

Test failure JIT\\opt\\Tailcall\\TailcallVerifyWithPrefix\\TailcallVerifyWithPrefix.cmd #79517

Closed
v-wenyuxu opened this issue Dec 12, 2022 · 4 comments · Fixed by #79532
Closed
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs Known Build Error Use this to report build issues in the .NET Helix tab os-windows

Comments

@v-wenyuxu
Copy link

v-wenyuxu commented Dec 12, 2022

Failed in Run: runtime-coreclr outerloop 20221211.2

Failed tests:

coreclr windows arm Checked no_tiered_compilation @ Windows.10.Arm64v8.Open

- JIT\\opt\\Tailcall\\TailcallVerifyWithPrefix\\TailcallVerifyWithPrefix.cmd

coreclr windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open

- JIT\\opt\\Tailcall\\TailcallVerifyWithPrefix\\TailcallVerifyWithPrefix.cmd 

Error message:


Return code:      1
Raw output file:      D:\h\w\AA0E0926\w\B52D098D\uploads\Reports\JIT.opt\Tailcall\TailcallVerifyWithPrefix\TailcallVerifyWithPrefix.output.txt
Raw output:
BEGIN EXECUTION
"D:\h\w\AA0E0926\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  TailcallVerifyWithPrefix.dll 
Executing Condition3.Test1 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition3.Test2 - Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: string
Execution finished - Test PASSED
Executing Condition4.Test1 - Caller: Arguments: None - ReturnType: 3 byte struct; Callee: Arguments: None - ReturnType: 3 byte struct
Execution finished - Test PASSED
Executing Condition4.Test2 - Caller: Arguments: None - ReturnType: 3 byte struct; Callee: Arguments: None - ReturnType: 3 byte struct [Verifying the field values in the return type struct]
Execution finished - Test PASSED
Executing Condition5.Test1 - There is a 'conv.i2' IL instruction between the tail. call to the Callee and the ret IL instruction which is not allowed. Expecting to catch an InvalidProgramException internally if tail. prefix is present.
Execution finished - Test PASSED
Executing Condition5.Test2 - Caller: Arguments: None - ReturnType: byte; Callee: Arguments: None - ReturnType: byte
Execution finished - Test PASSED
Executing Condition5.Test3 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition5.Test4 - Caller: Arguments: None - ReturnType: UInt32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition5.Test5 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: UInt32
Execution finished - Test PASSED
Executing Condition5.Test6 - Caller: Arguments: None - ReturnType: Int64; Callee: Arguments: None - ReturnType: UInt64
Execution finished - Test PASSED
Executing Condition5.Test7 - Caller: Arguments: None - ReturnType: UInt64; Callee: Arguments: None - ReturnType: Int64
Execution finished - Test PASSED
Executing Condition5.Test8 - Caller: Arguments: None - ReturnType: UInt64; Callee: Arguments: None - ReturnType: UInt32 - Expecting a InvalidProgramException
Execution finished - Test PASSED
Executing Condition5.Test9 - Caller: Arguments: None - ReturnType: UInt32; Callee: Arguments: None - ReturnType: UInt64 - Expecting a InvalidProgramException
Execution finished - Test PASSED
Executing Condition9.Test1 - Caller: Arguments: None - ReturnType: void; Callee(Interface Member): Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test1 - Caller<string>: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test2 - Caller: Arguments: None - ReturnType: void; Callee<string>: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test3 - class Foo1<string, int>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, int>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, short>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, ValueType3Bytes>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test4 - class Foo2<string, int>: Caller: Arguments: string, int - ReturnType: void; Callee: Arguments: string - ReturnType: void
                             class Foo2<string, int>: Caller: Arguments: string, int - ReturnType: void; Callee: Arguments: string - R

Stack trace:

   at JIT_opt._Tailcall_TailcallVerifyWithPrefix_TailcallVerifyWithPrefix_._Tailcall_TailcallVerifyWithPrefix_TailcallVerifyWithPrefix_cmd()
  at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
  at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
{
  "ErrorMessage": "FAILED: Callee1Recursive was not tailcall",
  "BuildRetry": false
}

Report

Build Definition Test Pull Request
109429 dotnet/runtime JIT.1.WorkItemExecution #79541
109365 dotnet/runtime JIT.1.WorkItemExecution #77597
109273 dotnet/runtime JIT.1.WorkItemExecution #79538
109118 dotnet/runtime JIT.1.WorkItemExecution #77480
109193 dotnet/runtime JIT.1.WorkItemExecution #79346
109146 dotnet/runtime JIT.1.WorkItemExecution
109167 dotnet/runtime JIT.1.WorkItemExecution #79530
109094 dotnet/runtime JIT.1.WorkItemExecution #79523
109070 dotnet/runtime JIT.1.WorkItemExecution #78888
109061 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution
108984 dotnet/runtime JIT.1.WorkItemExecution #79519
108931 dotnet/runtime JIT.1.WorkItemExecution
108979 dotnet/runtime JIT.1.WorkItemExecution #79489
108980 dotnet/runtime JIT.1.WorkItemExecution #79489
108895 dotnet/runtime JIT.1.WorkItemExecution
108891 dotnet/runtime JIT.1.WorkItemExecution #79427
108858 dotnet/runtime JIT.1.WorkItemExecution #78280
108842 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution #79346
108827 dotnet/runtime JIT.1.WorkItemExecution #76642
108817 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution
108807 dotnet/runtime JIT.1.WorkItemExecution #75054
108795 dotnet/runtime JIT.1.WorkItemExecution #79509
108784 dotnet/runtime JIT.1.WorkItemExecution #79501
108745 dotnet/runtime JIT.1.WorkItemExecution #79504
108739 dotnet/runtime JIT.1.WorkItemExecution #78279
108688 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution #79448
108594 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution #79381
108557 dotnet/runtime ComInterfaceGenerator.Unit.Tests.WorkItemExecution #79501

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
24 28 28
@v-wenyuxu v-wenyuxu added os-windows arch-x64 blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs labels Dec 12, 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 Dec 12, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 12, 2022
@ghost
Copy link

ghost commented Dec 12, 2022

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

Issue Details

Failed in Run: runtime-coreclr outerloop 20221211.2

Failed tests:

coreclr windows arm Checked no_tiered_compilation @ Windows.10.Arm64v8.Open

- JIT\\opt\\Tailcall\\TailcallVerifyWithPrefix\\TailcallVerifyWithPrefix.cmd

coreclr windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open

- JIT\\opt\\Tailcall\\TailcallVerifyWithPrefix\\TailcallVerifyWithPrefix.cmd 

Error message:


Return code:      1
Raw output file:      D:\h\w\AA0E0926\w\B52D098D\uploads\Reports\JIT.opt\Tailcall\TailcallVerifyWithPrefix\TailcallVerifyWithPrefix.output.txt
Raw output:
BEGIN EXECUTION
"D:\h\w\AA0E0926\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  TailcallVerifyWithPrefix.dll 
Executing Condition3.Test1 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition3.Test2 - Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: string
Execution finished - Test PASSED
Executing Condition4.Test1 - Caller: Arguments: None - ReturnType: 3 byte struct; Callee: Arguments: None - ReturnType: 3 byte struct
Execution finished - Test PASSED
Executing Condition4.Test2 - Caller: Arguments: None - ReturnType: 3 byte struct; Callee: Arguments: None - ReturnType: 3 byte struct [Verifying the field values in the return type struct]
Execution finished - Test PASSED
Executing Condition5.Test1 - There is a 'conv.i2' IL instruction between the tail. call to the Callee and the ret IL instruction which is not allowed. Expecting to catch an InvalidProgramException internally if tail. prefix is present.
Execution finished - Test PASSED
Executing Condition5.Test2 - Caller: Arguments: None - ReturnType: byte; Callee: Arguments: None - ReturnType: byte
Execution finished - Test PASSED
Executing Condition5.Test3 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition5.Test4 - Caller: Arguments: None - ReturnType: UInt32; Callee: Arguments: None - ReturnType: Int32
Execution finished - Test PASSED
Executing Condition5.Test5 - Caller: Arguments: None - ReturnType: Int32; Callee: Arguments: None - ReturnType: UInt32
Execution finished - Test PASSED
Executing Condition5.Test6 - Caller: Arguments: None - ReturnType: Int64; Callee: Arguments: None - ReturnType: UInt64
Execution finished - Test PASSED
Executing Condition5.Test7 - Caller: Arguments: None - ReturnType: UInt64; Callee: Arguments: None - ReturnType: Int64
Execution finished - Test PASSED
Executing Condition5.Test8 - Caller: Arguments: None - ReturnType: UInt64; Callee: Arguments: None - ReturnType: UInt32 - Expecting a InvalidProgramException
Execution finished - Test PASSED
Executing Condition5.Test9 - Caller: Arguments: None - ReturnType: UInt32; Callee: Arguments: None - ReturnType: UInt64 - Expecting a InvalidProgramException
Execution finished - Test PASSED
Executing Condition9.Test1 - Caller: Arguments: None - ReturnType: void; Callee(Interface Member): Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test1 - Caller<string>: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test2 - Caller: Arguments: None - ReturnType: void; Callee<string>: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test3 - class Foo1<string, int>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, int>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, short>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
                             class Foo1<string, ValueType3Bytes>: Caller: Arguments: None - ReturnType: void; Callee: Arguments: None - ReturnType: void
Execution finished - Test PASSED
Executing Condition10.Test4 - class Foo2<string, int>: Caller: Arguments: string, int - ReturnType: void; Callee: Arguments: string - ReturnType: void
                             class Foo2<string, int>: Caller: Arguments: string, int - ReturnType: void; Callee: Arguments: string - R

Stack trace:

   at JIT_opt._Tailcall_TailcallVerifyWithPrefix_TailcallVerifyWithPrefix_._Tailcall_TailcallVerifyWithPrefix_TailcallVerifyWithPrefix_cmd()
  at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
  at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Author: v-wenyuxu
Assignees: -
Labels:

os-windows, arch-x64, area-CodeGen-coreclr, blocking-outerloop

Milestone: -

@jkotas jkotas added the Known Build Error Use this to report build issues in the .NET Helix tab label Dec 12, 2022
@jakobbotsch
Copy link
Member

@jkotas is that the right known error message? It makes it look like a duplicate of #79439, but I don't think it is.

@jakobbotsch jakobbotsch self-assigned this Dec 12, 2022
@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Dec 12, 2022
@jakobbotsch
Copy link
Member

jakobbotsch commented Dec 12, 2022

The test is validating that a tailcall happens at a call site without a tail. prefix. After some recent changes we are able to inline functions that introduce an address-taken variable so we no longer tailcall.
The exact inlined path is:

  [INL01 IL=0005 TR=000007 06006F27] [INLINED: callee: below ALWAYS_INLINE size DEVIRT] System.Diagnostics.StackTrace:ToString():System.String:this
    [INL02 IL=0002 TR=000071 06006F28] [INLINED: call site: profitable inline] System.Diagnostics.StackTrace:ToString(int):System.String:this
      [INL03 IL=0005 TR=000082 06003BCE] [INLINED: callee: below ALWAYS_INLINE size] System.Text.StringBuilder:.ctor(int):this
        [INL04 IL=0007 TR=000100 06003BD2] [INLINED: call site: profitable inline] System.Text.StringBuilder:.ctor(int,int):this
          ...
          [INL12 IL=0071 TR=000124 0600055C] [INLINED: callee: aggressive inline attribute] System.GC:AllocateUninitializedArray[ushort](int,bool):ushort[]
            [INL13 IL=0003 TR=000199 06005990] [INLINED: callee: below ALWAYS_INLINE size] System.Runtime.CompilerServices.RuntimeHelpers:IsReferenceOrContainsReferences[ushort]():bool
            [INL14 IL=0041 TR=000205 06000566] [INLINED: call site: profitable inline] System.GC:<AllocateUninitializedArray>g__AllocateNewUninitializedArray|66_0[ushort](int,bool):ushort[]
              [INL15 IL=0021 TR=000231 060007C7] [INLINED: callee: below ALWAYS_INLINE size DEVIRT] System.RuntimeType:get_TypeHandle():System.RuntimeTypeHandle:this

where System.Text.StringBuilder:.ctor(int,int) is newly inlined (after #79460) and System.GC:AllocateUninitializedArray is the function that ends up introducing the address-taken local.

The variable isn't actually address exposed but we are quite conservative still (#65102 would have fixed it). Anyway, the test should not be trying to validate tailcalls without a tail prefix so I will just fix that.

jakobbotsch added a commit to jakobbotsch/runtime that referenced this issue Dec 12, 2022
Otherwise any change can cause us to stop tailcalling conservatively,
e.g. due to new inlining introducing an address-taken local.

Fix dotnet#79517
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 12, 2022
@jkotas
Copy link
Member

jkotas commented Dec 12, 2022

@jkotas is that the right known error message?

Copy&paste ... fixed.

jakobbotsch added a commit that referenced this issue Dec 12, 2022
Otherwise any change can cause us to stop tailcalling conservatively,
e.g. due to new inlining introducing an address-taken local.

Fix #79517
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 12, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-outerloop Blocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs Known Build Error Use this to report build issues in the .NET Helix tab os-windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants