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/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering failing in CI #105187

Open
jakobbotsch opened this issue Jul 20, 2024 · 3 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@jakobbotsch
Copy link
Member

jakobbotsch commented Jul 20, 2024

Example pipeline run (gcstress): https://dev.azure.com/dnceng-public/public/_build/results?buildId=748823&view=results
Example console log (win-x86): https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-5975cd368e984ab58d/JIT.opt.0.1/1/console.c75e012d.log?helixlogtype=result

14:51:36.875 Running test: JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd

Return code:      1
Raw output file:      C:\h\w\AC2E0993\w\A3BC08F3\uploads\ValueNumbering\ExposedLocalsNumbering\output.txt
Raw output:
BEGIN EXECUTION
 "C:\h\w\AC2E0993\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  ExposedLocalsNumbering.dll 
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101
END EXECUTION - FAILED
FAILED
Test failed. Trying to see if dump file was created in C:\cores since 7/20/2024 2:51:36 PM
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> C:\h\w\AC2E0993\w\A3BC08F3\e\JIT\opt\JIT.opt\../ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd
Xunit.Sdk.TrueException: 
Return code:      1
Raw output file:      C:\h\w\AC2E0993\w\A3BC08F3\uploads\ValueNumbering\ExposedLocalsNumbering\output.txt
Raw output:
BEGIN EXECUTION
 "C:\h\w\AC2E0993\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  ExposedLocalsNumbering.dll 
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101
END EXECUTION - FAILED
FAILED
Test failed. Trying to see if dump file was created in C:\cores since 7/20/2024 2:51:36 PM
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> C:\h\w\AC2E0993\w\A3BC08F3\e\JIT\opt\JIT.opt\../ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd
   at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146
   at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
   at Program.<<Main>$>g__TestExecutor351|0_352(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
14:51:42.813 Failed test: JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd

cc @EgorBo @SingleAccretion

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=748928
Build error leg or test failing: JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd
Pull request: #105185

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "Failed test.*ExposedLocalsNumbering",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=748823
Error message validated: [Failed test.*ExposedLocalsNumbering]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/20/2024 7:12:53 PM UTC

Report

Build Definition Test Pull Request
748928 dotnet/runtime JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd #105185
748823 dotnet/runtime JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 2 2
@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 Jul 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 20, 2024
Copy link
Contributor

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

@jakobbotsch jakobbotsch added blocking-clean-ci-optional Blocking optional rolling runs blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab and removed untriaged New issue has not been triaged by the area owner blocking-clean-ci-optional Blocking optional rolling runs labels Jul 20, 2024
@SingleAccretion SingleAccretion self-assigned this Jul 21, 2024
@SingleAccretion
Copy link
Contributor

This is a real (silent bad codegen) bug. The problem is in importation, where we duplicate the index load (V02 is the exposed index):

impIntrinsic: Expanding Span<T>.get_Item, T=System.Int32, sizeof(T)=4
with ptr-to-span
               [000007] -----------                         *  LCL_ADDR  byref  V00 arg0         [+0]
and index
               [000008] -----------                         *  LCL_VAR   int    V02 loc1         

    [ 2]  21 (0x015) ldind.i4
    [ 2]  22 (0x016) add
    [ 1]  23 (0x017) stloc.0

STMT00003 ( 0x00C[E-] ... ??? )
               [000023] DA-XGO-----                         *  STORE_LCL_VAR int    V01 loc0         
               [000022] ---XGO-----                         \--*  ADD       int   
               [000006] -----------                            +--*  LCL_VAR   int    V01 loc0         
               [000021] ---XGO-----                            \--*  IND       int   
               [000020] ---XGO-----                               \--*  COMMA     byref 
               [000013] ---XGO-----                                  +--*  BOUNDS_CHECK_Rng void  
               [000008] -----------                                  |  +--*  LCL_VAR   int    V02 loc1         
               [000012] n---G------                                  |  \--*  IND       int   
               [000011] -----------                                  |     \--*  FIELD_ADDR byref  System.Span`1[int]:_length
               [000007] -----------                                  |        \--*  LCL_ADDR  byref  V00 arg0         [+0]
               [000019] ----GO-----                                  \--*  ADD       byref 
               [000018] n---G------                                     +--*  IND       byref 
               [000017] -----------                                     |  \--*  FIELD_ADDR byref  System.Span`1[int]:_reference
               [000010] -----------                                     |     \--*  LCL_ADDR  byref  V00 arg0         [+0]
               [000016] -----------                                     \--*  MUL       long  
               [000014] ---------U-                                        +--*  CAST      long <- uint
               [000009] -----------                                        |  \--*  LCL_VAR   int    V02 loc1         
               [000015] -----------                                        \--*  CNS_INT   long   4

As a result, in codegen we end up with:

IN000b: 000048 call     [RyuJitReproduction.Program:CaptureIndex(ulong)]
IN000c: 00004E cmp      dword ptr [V02 rbp-0x40], ebx
IN000d: 000051 jae      G_M16903_IG10
IN000e: 000057 mov      ecx, dword ptr [V02 rbp-0x40]
IN000f: 00005A mov      ebx, dword ptr [rdi+4*rcx]

@SingleAccretion SingleAccretion removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Jul 21, 2024
@SingleAccretion SingleAccretion added this to the Future milestone Jul 21, 2024
@v-wenyuxu
Copy link

Failed in: runtime-coreclr pgostress 20240719.1

Failed tests:

coreclr osx arm64 Checked syntheticpgo_blend @ OSX.1200.ARM64.Open
    - JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd

Error message:

 
Return code:      1
Raw output file:      /tmp/helix/working/B70809E5/w/BB920A2C/uploads/ValueNumbering/ExposedLocalsNumbering/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/B70809E5/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true ExposedLocalsNumbering.dll ''
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at Xunit.Assert.Equal[T](T expected, T actual) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 90
   at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 7/20/2024 12:28:16 AM
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/B70809E5/w/BB920A2C/e/JIT/opt/JIT.opt/../ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.sh

Stack trace:

   at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146
   at Xunit.Assert.True(Boolean condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 128
   at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
   at Program.<<Main>$>g__TestExecutor351|0_352(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-07-21T06:18:20.19Z runtime-coreclr crossgen2 outerloop Checked osx.1200.arm64.open arm64 JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd Failed {"AzurePipelinesTestRunId":"18951996","DefinitionId":"134","Reason":"Schedule","BuildNumber":"20240720.1","System.JobId":"b98d1326-0c22-5cb0-0518-a01616fe181e","configuration":"Checked","BuildId":"749107","System.PhaseName":"run_test_p1_R2R_Composite_osx_arm64_checked","Project":"public","operatingSystem":"OSX.1200.ARM64.Open","DefinitionName":"runtime-coreclr crossgen2 outerloop","System.StageAttempt":"1","System.JobName":"__default","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"arm64","System.StageName":"Build","System.JobAttempt":"1","System.PhaseAttempt":"1"} Schedule
2024-07-20T06:24:20.242Z runtime-coreclr crossgen2 outerloop Checked osx.1200.arm64.open arm64 JIT/opt/ValueNumbering/ExposedLocalsNumbering/ExposedLocalsNumbering.cmd Failed {"architecture":"arm64","CollectionUri":"https://dev.azure.com/dnceng-public/","DefinitionName":"runtime-coreclr crossgen2 outerloop","Project":"public","AzurePipelinesTestRunId":"18932814","System.JobName":"__default","System.JobId":"b98d1326-0c22-5cb0-0518-a01616fe181e","BuildId":"748543","System.StageAttempt":"1","System.StageName":"Build","System.PhaseAttempt":"1","DefinitionId":"134","Reason":"Schedule","System.PhaseName":"run_test_p1_R2R_Composite_osx_arm64_checked","BuildNumber":"20240719.1","System.JobAttempt":"1","operatingSystem":"OSX.1200.ARM64.Open","configuration":"Checked"} Schedule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

3 participants