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: Assertion failed 'parent->OperGet() == oper' during 'LSRA allocate' #99810

Closed
jakobbotsch opened this issue Mar 15, 2024 · 11 comments · Fixed by #101824
Closed

JIT: Assertion failed 'parent->OperGet() == oper' during 'LSRA allocate' #99810

jakobbotsch opened this issue Mar 15, 2024 · 11 comments · Fixed by #101824
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes Priority:2 Work that is important, but not critical for the release
Milestone

Comments

@jakobbotsch
Copy link
Member

With DOTNET_JitStress=2 and DOTNET_JitStressRegs=8 we hit this assert in some of the Swift tests.

ISSUE: <ASSERT> #16 C:\dev\dotnet\runtime\src\coreclr\jit\lsra.cpp (7418) - Assertion failed 'parent->OperGet() == oper' in 'SwiftRetAbiStress:TestSwiftRetFunc0()' during 'LSRA allocate' (IL size 95; hash 0xbcced63c; Tier0)

When we hit the assert, the LIR looks like the following:

N070 ( 14,  5) [000038] --CXG-----Z                   t38 =CALL unman struct SwiftRetAbiStress:SwiftRetFunc0():SwiftRetAbiStress+S0 REG rax,rdx,rcx
                                                            ┌──▌  t38    struct
               [000129] --CXG------                  t129 =COPY      struct REG rbx,r15,NA
N072 (  3,  2) [000094] -----------                   t94 =    LCL_VAR   long   V03 FramesRoot    NA REG NA
                                                            ┌──▌  t94    long
N074 (  4,  3) [000096] -c---------                   t96 =LEA(b+12) long   REG NA
N076 (  1,  1) [000095] -c---------                   t95 =    CNS_INT   byte   1 REG NA
                                                            ┌──▌  t96    long
                                                            ├──▌  t95    byte
N078 ( 10,  8) [000097] -----------STOREIND  byte   REG NA
N080 (  3, 10) [000098] Hc---------                   t98 =    CNS_INT(h) long   0x10e8b4e70 ftn REG NA
                                                            ┌──▌  t98    long
N082 (  5, 12) [000099] nc--G------                   t99 =IND       int    REG NA
                                                            ┌──▌  t99    int
N084 (  6, 13) [000100] ----G------RETURNTRAP int    REG NA
N086 (  3,  2) [000101] -----------                  t101 =    LCL_VAR   long   V03 FramesRoot    NA REG NA
                                                            ┌──▌  t101   long
N088 (  4,  3) [000102] -c---------                  t102 =LEA(b+16) long   REG NA
N090 (  3,  4) [000103] -----------                  t103 =    LCL_FLD   byref (AX) V04 PInvokeFrame [+16] NA REG NA
                                                            ┌──▌  t102   long
                                                            ├──▌  t103   byref
N092 ( 11, 10) [000104] -----------STOREIND  long   REG NA
                                                            ┌──▌  t129   struct
N094 ( 24, 12) [000037] DACXG------STORE_LCL_VAR struct<SwiftRetAbiStress+S0, 18> V02 tmp1          NA REG NA

The refPosition has refPosition->reload == 1, but the parent node (of [000038]) is a GT_COPY.

I've attached an SPMI collection that repros the assertion on commit 0ea9b8f with clrjit_unix_x64_x64.dll -- pass -c 16.

maccol.zip

cc @kunalspathak -- any idea?

@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 15, 2024
@jakobbotsch jakobbotsch added the blocking-clean-ci-optional Blocking optional rolling runs label Mar 15, 2024
Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Mar 15, 2024
@kunalspathak
Copy link
Member

Thanks for the spmi collection. Will take a look.

@BruceForstall
Copy link
Member

@BruceForstall BruceForstall added the JitStress CLR JIT issues involving JIT internal stress modes label Mar 18, 2024
@BruceForstall BruceForstall added this to the 9.0.0 milestone Mar 18, 2024
@BruceForstall
Copy link
Member

Looks like it doesn't require JitStress, just JitStressRegs=8:

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

@v-wenyuxu
Copy link

Failed in: runtime-coreclr jitstressregs 20240324.1

Failed tests:

coreclr osx x64 Checked jitstressregs8 @ OSX.1200.Amd64.Open
    - Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd
    - Interop/Swift/SwiftRetAbiStress/SwiftRetAbiStress/SwiftRetAbiStress.cmd

Error message:

 
Assert failure(PID 20152 [0x00004eb8], Thread: 3760048 [0x395fb0]): Assertion failed 'parent->OperGet() == oper' in 'SwiftCallbackAbiStress:TestSwiftCallbackFunc7()' during 'LSRA allocate' (IL size 131; hash 0xbc37effb; FullOpts)

    File: /Users/runner/work/1/s/src/coreclr/jit/lsra.cpp:7418
    Image: /private/tmp/helix/working/AE97096A/p/corerun

waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/AE97096A/w/AB8C09F3/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh: line 441: 20152 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /tmp/helix/working/AE97096A/w/AB8C09F3/uploads/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/AE97096A/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true SwiftCallbackAbiStress.dll ''
Running SwiftCallbackFunc0: OK
Running SwiftCallbackFunc1: OK
Running SwiftCallbackFunc2: OK
Running SwiftCallbackFunc3: OK
Running SwiftCallbackFunc4: OK
Running SwiftCallbackFunc5: OK
Running SwiftCallbackFunc6: OK
[createdump] Gathering state for process 20152 
[createdump] Crashing thread 395fb0 signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.20152.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.20152.dmp
[createdump] Written 436633752 bytes (106600 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 1999ms
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 3/24/2024 7:42:36 AM
Processing /cores/coredump.20152.dmp.crashreport.json
Printing stacktrace from '/cores/coredump.20152.dmp.crashreport.json'
Invoking llvm-symbolizer --pretty-print
Errors while running llvm-symbolizer --pretty-print
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'llvm-symbolizer' with working directory '/private/tmp/helix/working/AE97096A/w/AB8C09F3/e/Interop/Interop'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 496
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 456
   at CoreclrTestLib.CoreclrTestWrapperLib.TryPrintStackTraceFromCrashReport(String crashReportJsonFile, TextWriter outputWriter)
Finish looking for *.crashreport.json. No new files created.
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/AE97096A/w/AB8C09F3/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh

Stack trace:

   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)
   at Program.<<Main>$>g__TestExecutor275|25_276(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-03-24T18:54:22.773Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageAttempt":"1","Project":"public","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","System.JobAttempt":"1","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240324.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","DefinitionId":"111","System.JobName":"__default","System.PhaseName":"run_test_p1__osx_x64_checked","architecture":"x64","AzurePipelinesTestRunId":"15057288","Reason":"Schedule","BuildId":"616086","DefinitionName":"runtime-coreclr jitstress2-jitstressregs"} Schedule
2024-03-24T11:38:47.691Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","Reason":"Schedule","System.JobAttempt":"1","DefinitionId":"110","configuration":"Checked-jitstressregs8","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240324.1","System.JobName":"__default","AzurePipelinesTestRunId":"15049768","Project":"public","System.PhaseName":"run_test_p1__osx_x64_checked","System.PhaseAttempt":"1","System.StageName":"Build","BuildId":"615885"} Schedule

@v-wenyuxu
Copy link

Failed in: runtime-coreclr jitstressregs 20240331.1

Failed tests:

coreclr osx x64 Checked jitstressregs8 @ OSX.1200.Amd64.Open
    - Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd
    - Interop/Swift/SwiftRetAbiStress/SwiftRetAbiStress/SwiftRetAbiStress.cmd

Error message:

 
Assert failure(PID 34074 [0x0000851a], Thread: 4018545 [0x3d5171]): Assertion failed 'parent->OperGet() == oper' in 'SwiftCallbackAbiStress:TestSwiftCallbackFunc7()' during 'LSRA allocate' (IL size 131; hash 0xbc37effb; FullOpts)

    File: /Users/runner/work/1/s/src/coreclr/jit/lsra.cpp:7418
    Image: /private/tmp/helix/working/A57D0965/p/corerun

waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/A57D0965/w/9EB8090D/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh: line 441: 34074 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /tmp/helix/working/A57D0965/w/9EB8090D/uploads/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/A57D0965/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true SwiftCallbackAbiStress.dll ''
Running SwiftCallbackFunc0: OK
Running SwiftCallbackFunc1: OK
Running SwiftCallbackFunc2: OK
Running SwiftCallbackFunc3: OK
Running SwiftCallbackFunc4: OK
Running SwiftCallbackFunc5: OK
Running SwiftCallbackFunc6: OK
[createdump] Gathering state for process 34074 
[createdump] Crashing thread 3d5171 signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.34074.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.34074.dmp
[createdump] Written 383160472 bytes (93545 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 1653ms
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 3/31/2024 7:31:05 AM
Processing /cores/coredump.34074.dmp.crashreport.json
Printing stacktrace from '/cores/coredump.34074.dmp.crashreport.json'
Invoking llvm-symbolizer --pretty-print
Errors while running llvm-symbolizer --pretty-print
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'llvm-symbolizer' with working directory '/private/tmp/helix/working/A57D0965/w/9EB8090D/e/Interop/Interop'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 496
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 456
   at CoreclrTestLib.CoreclrTestWrapperLib.TryPrintStackTraceFromCrashReport(String crashReportJsonFile, TextWriter outputWriter)
Finish looking for *.crashreport.json. No new files created.
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/A57D0965/w/9EB8090D/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh

Stack trace:

   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)
   at Program.<<Main>$>g__TestExecutor275|25_276(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-03-31T11:26:36.451Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.PhaseName":"run_test_p1__osx_x64_checked","System.StageAttempt":"1","AzurePipelinesTestRunId":"15322650","configuration":"Checked-jitstressregs8","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","Project":"public","System.JobName":"__default","BuildNumber":"20240331.1","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"x64","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","DefinitionId":"110","BuildId":"625180"} Schedule
2024-03-30T18:45:33.404Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","BuildNumber":"20240330.1","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionId":"111","Project":"public","System.StageAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseAttempt":"1","BuildId":"624976","System.JobAttempt":"1","Reason":"Schedule","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","AzurePipelinesTestRunId":"15315320","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-03-30T11:43:06.193Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Project":"public","System.StageAttempt":"1","configuration":"Checked-jitstressregs8","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","architecture":"x64","Reason":"Schedule","System.JobName":"__default","AzurePipelinesTestRunId":"15306504","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildId":"624754","operatingSystem":"OSX.1200.Amd64.Open","BuildNumber":"20240330.1","System.JobAttempt":"1","System.PhaseAttempt":"1","System.StageName":"Build","DefinitionId":"110"} Schedule
2024-03-24T18:54:22.773Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageAttempt":"1","Project":"public","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","System.JobAttempt":"1","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240324.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","DefinitionId":"111","System.JobName":"__default","System.PhaseName":"run_test_p1__osx_x64_checked","architecture":"x64","AzurePipelinesTestRunId":"15057288","Reason":"Schedule","BuildId":"616086","DefinitionName":"runtime-coreclr jitstress2-jitstressregs"} Schedule
2024-03-24T11:38:47.691Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","Reason":"Schedule","System.JobAttempt":"1","DefinitionId":"110","configuration":"Checked-jitstressregs8","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240324.1","System.JobName":"__default","AzurePipelinesTestRunId":"15049768","Project":"public","System.PhaseName":"run_test_p1__osx_x64_checked","System.PhaseAttempt":"1","System.StageName":"Build","BuildId":"615885"} Schedule

@v-wenyuxu
Copy link

Failed in: runtime-coreclr jitstressregs 20240406.1

Failed tests:

coreclr osx x64 Checked jitstressregs8 @ OSX.1200.Amd64.Open
    - Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd
    - Interop/Swift/SwiftRetAbiStress/SwiftRetAbiStress/SwiftRetAbiStress.cmd

Error message:

 
Assert failure(PID 42574 [0x0000a64e], Thread: 2909358 [0x2c64ae]): Assertion failed 'parent->OperGet() == oper' in 'SwiftCallbackAbiStress:TestSwiftCallbackFunc5()' during 'LSRA allocate' (IL size 131; hash 0xbc37e779; FullOpts)

    File: /Users/runner/work/1/s/src/coreclr/jit/lsra.cpp:7409
    Image: /private/tmp/helix/working/B156097E/p/corerun

waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/B156097E/w/B2760A37/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh: line 441: 42574 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /tmp/helix/working/B156097E/w/B2760A37/uploads/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/B156097E/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true SwiftCallbackAbiStress.dll ''
Running SwiftCallbackFunc0: OK
Running SwiftCallbackFunc1: OK
Running SwiftCallbackFunc2: OK
Running SwiftCallbackFunc3: OK
Running SwiftCallbackFunc4: OK
[createdump] Gathering state for process 42574 
[createdump] Crashing thread 2c64ae signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.42574.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.42574.dmp
[createdump] Written 392552600 bytes (95838 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 1690ms
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 4/6/2024 7:51:38 AM
Processing /cores/coredump.42574.dmp.crashreport.json
Printing stacktrace from '/cores/coredump.42574.dmp.crashreport.json'
Invoking llvm-symbolizer --pretty-print
Errors while running llvm-symbolizer --pretty-print
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'llvm-symbolizer' with working directory '/private/tmp/helix/working/B156097E/w/B2760A37/e/Interop/Interop'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 496
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 456
   at CoreclrTestLib.CoreclrTestWrapperLib.TryPrintStackTraceFromCrashReport(String crashReportJsonFile, TextWriter outputWriter)
Finish looking for *.crashreport.json. No new files created.
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/B156097E/w/B2760A37/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh

Stack trace:

   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)
   at Program.<<Main>$>g__TestExecutor277|25_278(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-04-06T18:46:08.639Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageName":"Build","System.PhaseAttempt":"1","BuildNumber":"20240406.1","BuildId":"633144","Project":"public","System.JobAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","Reason":"Schedule","System.StageAttempt":"1","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","architecture":"x64","CollectionUri":"https://dev.azure.com/dnceng-public/","AzurePipelinesTestRunId":"15566382","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-06T11:46:26.965Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","architecture":"x64","AzurePipelinesTestRunId":"15557594","System.PhaseAttempt":"1","System.JobAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240406.1","DefinitionId":"110","BuildId":"632905","System.StageAttempt":"1","Reason":"Schedule","System.JobName":"__default","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","Project":"public"} Schedule
2024-03-31T11:26:36.451Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.PhaseName":"run_test_p1__osx_x64_checked","System.StageAttempt":"1","AzurePipelinesTestRunId":"15322650","configuration":"Checked-jitstressregs8","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","Project":"public","System.JobName":"__default","BuildNumber":"20240331.1","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"x64","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","DefinitionId":"110","BuildId":"625180"} Schedule
2024-03-30T18:45:33.404Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","BuildNumber":"20240330.1","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionId":"111","Project":"public","System.StageAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseAttempt":"1","BuildId":"624976","System.JobAttempt":"1","Reason":"Schedule","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","AzurePipelinesTestRunId":"15315320","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-03-30T11:43:06.193Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Project":"public","System.StageAttempt":"1","configuration":"Checked-jitstressregs8","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","architecture":"x64","Reason":"Schedule","System.JobName":"__default","AzurePipelinesTestRunId":"15306504","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildId":"624754","operatingSystem":"OSX.1200.Amd64.Open","BuildNumber":"20240330.1","System.JobAttempt":"1","System.PhaseAttempt":"1","System.StageName":"Build","DefinitionId":"110"} Schedule
2024-03-24T18:54:22.773Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageAttempt":"1","Project":"public","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","System.JobAttempt":"1","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240324.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","DefinitionId":"111","System.JobName":"__default","System.PhaseName":"run_test_p1__osx_x64_checked","architecture":"x64","AzurePipelinesTestRunId":"15057288","Reason":"Schedule","BuildId":"616086","DefinitionName":"runtime-coreclr jitstress2-jitstressregs"} Schedule
2024-03-24T11:38:47.691Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","Reason":"Schedule","System.JobAttempt":"1","DefinitionId":"110","configuration":"Checked-jitstressregs8","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240324.1","System.JobName":"__default","AzurePipelinesTestRunId":"15049768","Project":"public","System.PhaseName":"run_test_p1__osx_x64_checked","System.PhaseAttempt":"1","System.StageName":"Build","BuildId":"615885"} Schedule

@v-wenyuxu
Copy link

Failed in: runtime-coreclr jitstressregs 20240414.1

Failed tests:

coreclr osx x64 Checked jitstressregs8 @ OSX.1200.Amd64.Open
    - Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd
    - Interop/Swift/SwiftRetAbiStress/SwiftRetAbiStress/SwiftRetAbiStress.cmd

Error message:

 
Assert failure(PID 95631 [0x0001758f], Thread: 3874501 [0x3b1ec5]): Assertion failed 'parent->OperGet() == oper' in 'SwiftCallbackAbiStress:TestSwiftCallbackFunc5()' during 'LSRA allocate' (IL size 131; hash 0xbc37e779; FullOpts)

    File: /Users/runner/work/1/s/src/coreclr/jit/lsra.cpp:7394
    Image: /private/tmp/helix/working/ABE2094B/p/corerun

waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/ABE2094B/w/BAF30A30/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh: line 441: 95631 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /tmp/helix/working/ABE2094B/w/BAF30A30/uploads/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/ABE2094B/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true SwiftCallbackAbiStress.dll ''
Running SwiftCallbackFunc0: OK
Running SwiftCallbackFunc1: OK
Running SwiftCallbackFunc2: OK
Running SwiftCallbackFunc3: OK
Running SwiftCallbackFunc4: OK
[createdump] Gathering state for process 95631 
[createdump] Crashing thread 3b1ec5 signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.95631.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.95631.dmp
[createdump] Written 378032280 bytes (92293 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 2288ms
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 4/14/2024 4:43:54 AM
Processing /cores/coredump.95631.dmp.crashreport.json
Printing stacktrace from '/cores/coredump.95631.dmp.crashreport.json'
Invoking llvm-symbolizer --pretty-print
Errors while running llvm-symbolizer --pretty-print
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'llvm-symbolizer' with working directory '/private/tmp/helix/working/ABE2094B/w/BAF30A30/e/Interop/Interop'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 496
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 456
   at CoreclrTestLib.CoreclrTestWrapperLib.TryPrintStackTraceFromCrashReport(String crashReportJsonFile, TextWriter outputWriter)
Finish looking for *.crashreport.json. No new files created.
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/ABE2094B/w/BAF30A30/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh

Stack trace:

   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)
   at Program.<<Main>$>g__TestExecutor277|25_278(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-04-14T18:40:02.233Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","Project":"public","operatingSystem":"OSX.1200.Amd64.Open","AzurePipelinesTestRunId":"15857832","architecture":"x64","System.StageAttempt":"1","System.StageName":"Build","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseAttempt":"1","System.JobName":"__default","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240414.1","System.JobAttempt":"1","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseName":"run_test_p1__osx_x64_checked","BuildId":"642857"} Schedule
2024-04-14T11:39:27.224Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","Project":"public","DefinitionId":"110","operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseAttempt":"1","BuildId":"642690","BuildNumber":"20240414.1","AzurePipelinesTestRunId":"15851670","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstressregs","System.StageAttempt":"1","System.JobName":"__default","System.JobAttempt":"1","System.StageName":"Build"} Schedule
2024-04-13T18:45:08.916Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","BuildNumber":"20240413.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","Project":"public","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","BuildId":"642318","System.PhaseAttempt":"1","System.JobName":"__default","AzurePipelinesTestRunId":"15843356","System.JobAttempt":"1","System.StageAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionId":"111"} Schedule
2024-04-13T11:37:41.534Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","System.JobName":"__default","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstressregs","Project":"public","AzurePipelinesTestRunId":"15836264","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","DefinitionId":"110","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240413.1","architecture":"x64","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","BuildId":"642056","System.PhaseName":"run_test_p1__osx_x64_checked"} Schedule
2024-04-07T18:43:20.591Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.JobAttempt":"1","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.StageName":"Build","Reason":"Schedule","AzurePipelinesTestRunId":"15587886","architecture":"x64","System.PhaseAttempt":"1","BuildId":"633990","BuildNumber":"20240407.1","Project":"public","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.JobName":"__default","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/"} Schedule
2024-04-07T11:47:05.336Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"BuildNumber":"20240407.1","configuration":"Checked-jitstressregs8","DefinitionId":"110","BuildId":"633745","System.StageName":"Build","architecture":"x64","System.PhaseName":"run_test_p1__osx_x64_checked","Project":"public","AzurePipelinesTestRunId":"15580598","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","System.JobAttempt":"1","System.PhaseAttempt":"1","System.JobName":"__default","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-06T18:46:08.639Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageName":"Build","System.PhaseAttempt":"1","BuildNumber":"20240406.1","BuildId":"633144","Project":"public","System.JobAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","Reason":"Schedule","System.StageAttempt":"1","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","architecture":"x64","CollectionUri":"https://dev.azure.com/dnceng-public/","AzurePipelinesTestRunId":"15566382","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-06T11:46:26.965Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","architecture":"x64","AzurePipelinesTestRunId":"15557594","System.PhaseAttempt":"1","System.JobAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240406.1","DefinitionId":"110","BuildId":"632905","System.StageAttempt":"1","Reason":"Schedule","System.JobName":"__default","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","Project":"public"} Schedule
2024-03-31T11:26:36.451Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.PhaseName":"run_test_p1__osx_x64_checked","System.StageAttempt":"1","AzurePipelinesTestRunId":"15322650","configuration":"Checked-jitstressregs8","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","Project":"public","System.JobName":"__default","BuildNumber":"20240331.1","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"x64","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","DefinitionId":"110","BuildId":"625180"} Schedule
2024-03-30T18:45:33.404Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","BuildNumber":"20240330.1","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionId":"111","Project":"public","System.StageAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseAttempt":"1","BuildId":"624976","System.JobAttempt":"1","Reason":"Schedule","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","AzurePipelinesTestRunId":"15315320","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-03-30T11:43:06.193Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Project":"public","System.StageAttempt":"1","configuration":"Checked-jitstressregs8","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","architecture":"x64","Reason":"Schedule","System.JobName":"__default","AzurePipelinesTestRunId":"15306504","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildId":"624754","operatingSystem":"OSX.1200.Amd64.Open","BuildNumber":"20240330.1","System.JobAttempt":"1","System.PhaseAttempt":"1","System.StageName":"Build","DefinitionId":"110"} Schedule
2024-03-24T18:54:22.773Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageAttempt":"1","Project":"public","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","System.JobAttempt":"1","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240324.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","DefinitionId":"111","System.JobName":"__default","System.PhaseName":"run_test_p1__osx_x64_checked","architecture":"x64","AzurePipelinesTestRunId":"15057288","Reason":"Schedule","BuildId":"616086","DefinitionName":"runtime-coreclr jitstress2-jitstressregs"} Schedule
2024-03-24T11:38:47.691Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","Reason":"Schedule","System.JobAttempt":"1","DefinitionId":"110","configuration":"Checked-jitstressregs8","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240324.1","System.JobName":"__default","AzurePipelinesTestRunId":"15049768","Project":"public","System.PhaseName":"run_test_p1__osx_x64_checked","System.PhaseAttempt":"1","System.StageName":"Build","BuildId":"615885"} Schedule

@v-wenyuxu
Copy link

Failed in: runtime-coreclr jitstressregs 20240421.1

Failed tests:

coreclr osx x64 Checked jitstressregs8 @ OSX.1200.Amd64.Open
    - Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd

Error message:

 
Assert failure(PID 3912 [0x00000f48], Thread: 36693 [0x8f55]): Assertion failed 'parent->OperGet() == oper' in 'SwiftCallbackAbiStress:TestSwiftCallbackFunc5()' during 'LSRA allocate' (IL size 131; hash 0xbc37e779; FullOpts)

    File: /Users/runner/work/1/s/src/coreclr/jit/lsra.cpp:7394
    Image: /private/tmp/helix/working/B79109FE/p/corerun

waitpid() returned successfully (wstatus 00000000) WEXITSTATUS 0 WTERMSIG 0
/private/tmp/helix/working/B79109FE/w/C4490A43/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh: line 441:  3912 Abort trap: 6           (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code:      1
Raw output file:      /tmp/helix/working/B79109FE/w/C4490A43/uploads/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/output.txt
Raw output:
BEGIN EXECUTION
/tmp/helix/working/B79109FE/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true SwiftCallbackAbiStress.dll ''
Running SwiftCallbackFunc0: OK
Running SwiftCallbackFunc1: OK
Running SwiftCallbackFunc2: OK
Running SwiftCallbackFunc3: OK
Running SwiftCallbackFunc4: OK
[createdump] Gathering state for process 3912 
[createdump] Crashing thread 8f55 signal 6 (0006)
[createdump] Writing crash report to file /cores/coredump.3912.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /cores/coredump.3912.dmp
[createdump] Written 363163800 bytes (88663 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 7933ms
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /cores since 4/21/2024 8:02:57 AM
Processing /cores/coredump.3912.dmp.crashreport.json
Printing stacktrace from '/cores/coredump.3912.dmp.crashreport.json'
Invoking llvm-symbolizer --pretty-print
Errors while running llvm-symbolizer --pretty-print
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'llvm-symbolizer' with working directory '/private/tmp/helix/working/B79109FE/w/C4490A43/e/Interop/Interop'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 496
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) in /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs:line 456
   at CoreclrTestLib.CoreclrTestWrapperLib.TryPrintStackTraceFromCrashReport(String crashReportJsonFile, TextWriter outputWriter)
Finish looking for *.crashreport.json. No new files created.
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /private/tmp/helix/working/B79109FE/w/C4490A43/e/Interop/Interop/../Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.sh

Stack trace:

   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)
   at Program.<<Main>$>g__TestExecutor277|25_278(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
Queued Pipeline Pipeline_Configuration OS Arch Test Outcome Properties BuildReason
2024-04-21T18:54:17.497Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Reason":"Schedule","System.JobName":"__default","configuration":"Checked-jitstress2_jitstressregs8","DefinitionId":"111","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.PhaseName":"run_test_p1__osx_x64_checked","BuildNumber":"20240421.1","Project":"public","System.PhaseAttempt":"1","System.JobAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","BuildId":"651209","AzurePipelinesTestRunId":"16101156"} Schedule
2024-04-21T11:44:35.76Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","System.JobAttempt":"1","System.JobName":"__default","BuildNumber":"20240421.1","System.PhaseAttempt":"1","DefinitionId":"110","Reason":"Schedule","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"x64","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","BuildId":"651052","Project":"public","DefinitionName":"runtime-coreclr jitstressregs","System.StageName":"Build","AzurePipelinesTestRunId":"16096432"} Schedule
2024-04-20T18:49:18.65Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"architecture":"x64","AzurePipelinesTestRunId":"16088012","System.StageAttempt":"1","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","System.StageName":"Build","System.JobName":"__default","Project":"public","BuildId":"650697","Reason":"Schedule","DefinitionId":"111","BuildNumber":"20240420.1","configuration":"Checked-jitstress2_jitstressregs8","System.JobAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-20T11:50:35.507Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","CollectionUri":"https://dev.azure.com/dnceng-public/","DefinitionName":"runtime-coreclr jitstressregs","System.PhaseAttempt":"1","DefinitionId":"110","System.StageName":"Build","BuildId":"650519","operatingSystem":"OSX.1200.Amd64.Open","AzurePipelinesTestRunId":"16082270","architecture":"x64","BuildNumber":"20240420.1","System.PhaseName":"run_test_p1__osx_x64_checked","Project":"public","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.JobName":"__default","Reason":"Schedule","System.StageAttempt":"1","System.JobAttempt":"1"} Schedule
2024-04-14T18:40:02.233Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","Project":"public","operatingSystem":"OSX.1200.Amd64.Open","AzurePipelinesTestRunId":"15857832","architecture":"x64","System.StageAttempt":"1","System.StageName":"Build","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseAttempt":"1","System.JobName":"__default","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240414.1","System.JobAttempt":"1","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseName":"run_test_p1__osx_x64_checked","BuildId":"642857"} Schedule
2024-04-14T11:39:27.224Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","Project":"public","DefinitionId":"110","operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseAttempt":"1","BuildId":"642690","BuildNumber":"20240414.1","AzurePipelinesTestRunId":"15851670","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstressregs","System.StageAttempt":"1","System.JobName":"__default","System.JobAttempt":"1","System.StageName":"Build"} Schedule
2024-04-13T18:45:08.916Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","BuildNumber":"20240413.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","Project":"public","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","BuildId":"642318","System.PhaseAttempt":"1","System.JobName":"__default","AzurePipelinesTestRunId":"15843356","System.JobAttempt":"1","System.StageAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionId":"111"} Schedule
2024-04-13T11:37:41.534Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","System.JobName":"__default","Reason":"Schedule","DefinitionName":"runtime-coreclr jitstressregs","Project":"public","AzurePipelinesTestRunId":"15836264","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","DefinitionId":"110","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240413.1","architecture":"x64","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","BuildId":"642056","System.PhaseName":"run_test_p1__osx_x64_checked"} Schedule
2024-04-07T18:43:20.591Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.JobAttempt":"1","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.StageName":"Build","Reason":"Schedule","AzurePipelinesTestRunId":"15587886","architecture":"x64","System.PhaseAttempt":"1","BuildId":"633990","BuildNumber":"20240407.1","Project":"public","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.JobName":"__default","System.StageAttempt":"1","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/"} Schedule
2024-04-07T11:47:05.336Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"BuildNumber":"20240407.1","configuration":"Checked-jitstressregs8","DefinitionId":"110","BuildId":"633745","System.StageName":"Build","architecture":"x64","System.PhaseName":"run_test_p1__osx_x64_checked","Project":"public","AzurePipelinesTestRunId":"15580598","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","System.JobAttempt":"1","System.PhaseAttempt":"1","System.JobName":"__default","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-06T18:46:08.639Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageName":"Build","System.PhaseAttempt":"1","BuildNumber":"20240406.1","BuildId":"633144","Project":"public","System.JobAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","Reason":"Schedule","System.StageAttempt":"1","DefinitionId":"111","configuration":"Checked-jitstress2_jitstressregs8","architecture":"x64","CollectionUri":"https://dev.azure.com/dnceng-public/","AzurePipelinesTestRunId":"15566382","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseName":"run_test_p1__osx_x64_checked","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-04-06T11:46:26.965Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"configuration":"Checked-jitstressregs8","architecture":"x64","AzurePipelinesTestRunId":"15557594","System.PhaseAttempt":"1","System.JobAttempt":"1","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240406.1","DefinitionId":"110","BuildId":"632905","System.StageAttempt":"1","Reason":"Schedule","System.JobName":"__default","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","Project":"public"} Schedule
2024-03-31T11:26:36.451Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.PhaseName":"run_test_p1__osx_x64_checked","System.StageAttempt":"1","AzurePipelinesTestRunId":"15322650","configuration":"Checked-jitstressregs8","System.PhaseAttempt":"1","System.StageName":"Build","System.JobAttempt":"1","Project":"public","System.JobName":"__default","BuildNumber":"20240331.1","Reason":"Schedule","operatingSystem":"OSX.1200.Amd64.Open","CollectionUri":"https://dev.azure.com/dnceng-public/","architecture":"x64","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionName":"runtime-coreclr jitstressregs","DefinitionId":"110","BuildId":"625180"} Schedule
2024-03-30T18:45:33.404Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","BuildNumber":"20240330.1","System.PhaseName":"run_test_p1__osx_x64_checked","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","DefinitionId":"111","Project":"public","System.StageAttempt":"1","System.JobName":"__default","DefinitionName":"runtime-coreclr jitstress2-jitstressregs","System.PhaseAttempt":"1","BuildId":"624976","System.JobAttempt":"1","Reason":"Schedule","architecture":"x64","configuration":"Checked-jitstress2_jitstressregs8","AzurePipelinesTestRunId":"15315320","operatingSystem":"OSX.1200.Amd64.Open"} Schedule
2024-03-30T11:43:06.193Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"Project":"public","System.StageAttempt":"1","configuration":"Checked-jitstressregs8","CollectionUri":"https://dev.azure.com/dnceng-public/","System.PhaseName":"run_test_p1__osx_x64_checked","DefinitionName":"runtime-coreclr jitstressregs","architecture":"x64","Reason":"Schedule","System.JobName":"__default","AzurePipelinesTestRunId":"15306504","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildId":"624754","operatingSystem":"OSX.1200.Amd64.Open","BuildNumber":"20240330.1","System.JobAttempt":"1","System.PhaseAttempt":"1","System.StageName":"Build","DefinitionId":"110"} Schedule
2024-03-24T18:54:22.773Z runtime-coreclr jitstress2-jitstressregs Checked-jitstress2_jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"System.StageAttempt":"1","Project":"public","CollectionUri":"https://dev.azure.com/dnceng-public/","System.StageName":"Build","operatingSystem":"OSX.1200.Amd64.Open","System.JobAttempt":"1","configuration":"Checked-jitstress2_jitstressregs8","BuildNumber":"20240324.1","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","System.PhaseAttempt":"1","DefinitionId":"111","System.JobName":"__default","System.PhaseName":"run_test_p1__osx_x64_checked","architecture":"x64","AzurePipelinesTestRunId":"15057288","Reason":"Schedule","BuildId":"616086","DefinitionName":"runtime-coreclr jitstress2-jitstressregs"} Schedule
2024-03-24T11:38:47.691Z runtime-coreclr jitstressregs Checked-jitstressregs8 osx.1200.amd64.open x64 Interop/Swift/SwiftCallbackAbiStress/SwiftCallbackAbiStress/SwiftCallbackAbiStress.cmd Failed {"operatingSystem":"OSX.1200.Amd64.Open","architecture":"x64","System.StageAttempt":"1","CollectionUri":"https://dev.azure.com/dnceng-public/","Reason":"Schedule","System.JobAttempt":"1","DefinitionId":"110","configuration":"Checked-jitstressregs8","DefinitionName":"runtime-coreclr jitstressregs","System.JobId":"bf644a0b-2dbe-5a03-d8c6-a86fdd97c823","BuildNumber":"20240324.1","System.JobName":"__default","AzurePipelinesTestRunId":"15049768","Project":"public","System.PhaseName":"run_test_p1__osx_x64_checked","System.PhaseAttempt":"1","System.StageName":"Build","BuildId":"615885"} Schedule

@JulieLeeMSFT JulieLeeMSFT added the Priority:2 Work that is important, but not critical for the release label May 1, 2024
@kunalspathak
Copy link
Member

kunalspathak commented May 2, 2024

We define 3 multi-reg for SwiftRetAbiStress:SwiftRetFunc0():SwiftRetAbiStress+S0. At the use, we do not get same registers for all 3 of them and so we need to insert GT_COPY. 2 of the registers are not spilled and hence COPY suffice, but for 3rd, we spilled it and hence have to RELOAD it (to a different register) at the use.

────────────────────────────────────────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
TreeID   Loc RP#  Name Type  Action    Reg  │rax │rcx │rdx │rbx │rsi │rdi │r8  │r9  │r12 │r13 │r15 │
────────────────────────────────────────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
          71.#70  I14  Def    DUconflict    │    │    │    │    │    │    │    │    │    │    │    │
  Case #6 need a copy                       │    │    │    │    │    │    │    │    │    │    │    │
                              Alloc    rax  │I14a│    │    │    │    │    │    │    │    │    │    │
          71.#71  rdx  Fixd   Keep     rdx  │I14a│    │    │    │    │    │    │    │    │    │    │          
          71.#72  I15  Def    DUconflict    │I14a│    │    │    │    │    │    │    │    │    │    │
  Case #6 need a copy                       │I14a│    │    │    │    │    │    │    │    │    │    │
    (multiReg)                              │I14a│    │    │    │    │    │    │    │    │    │    │
                              Alloc    rdx  │I14a│    │I15a│    │    │    │    │    │    │    │    │
          71.#73  rcx  Fixd   Keep     rcx  │I14a│    │I15a│    │    │    │    │    │    │    │    │
          71.#74  I16  Def    DUconflict    │I14a│    │I15a│    │    │    │    │    │    │    │    │
  Case #6 need a copy                       │I14a│    │I15a│    │    │    │    │    │    │    │    │
    (multiReg)                              │I14a│    │I15a│    │    │    │    │    │    │    │    │
                              Alloc    rcx  │I14a│I16a│I15a│    │    │    │    │    │    │    │    │
...
────────────────────────────────────────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
TreeID   Loc RP#  Name Type  Action    Reg  │rax │rcx │rdx │rbx │rsi │rdi │r8  │r9  │r12 │r13 │r15 │
────────────────────────────────────────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
[000037]  94.#104 I14  Use *  ORDER(C) rbx  │I14a│    │I15a│I14a│    │    │    │    │    │    │    │                              
          94.#105 I15  Use *  ORDER(C) r15  │I14a│    │I15a│I14a│    │    │    │    │    │    │I15a│
          94.#106 I16  Use *  ReLod    NA   │I14a│    │I15a│I14a│    │    │    │    │    │    │I15a│
────────────────────────────────────────────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤

At the use, we create this single tree node GenTreeCopyOrReload and set multiRegIdx for the 3 registers. However, for the 3rd register (which is RELOAD), we cannot use the logic of GT_COPY and emit the mov, but need to reload it from the stack. If we ignore the fact that GT_COPY is required for the 3rd register and let GT_RELOAD continue, I wanted to see where it goes wrong, but unfortunately the superpmi collection I have seems outdated and it failed with MISSING: Method context 16 failed to replay: SuperPMI assertion failed (missing key "key" in map GetHelperFtn): key 82. Probably I will need to try reproing on osx/x64 directly and test out few theories.

I am also wondering why we did not see similar situation in the past or perhaps the jitstressregs were restricting it from limiting the available regs under stress, making this situation less common or undiscovered.

@kunalspathak
Copy link
Member

If we ignore the fact that GT_COPY is required for the 3rd register and let GT_RELOAD continue

It turns out, we do mark the entire tree spilled when one or more allocated registers are spilled

// In case of multi-reg node, also set spill flag on the
// register specified by multi-reg index of current RefPosition.
// Note that the spill flag on treeNode indicates that one or
// more its allocated registers are in that state.
if (treeNode->IsMultiRegNode())
{
treeNode->SetRegSpillFlagByIdx(GTF_SPILL, currentRefPosition->getMultiRegIdx());
}
}

and during unspill, already take care of that.

// In case of multi-reg node, spill flag on it indicates that one or more of its allocated regs need to
// be spilled, and it needs to be further queried to know which of its result regs needs to be spilled.
const unsigned regCount = tree->GetMultiRegCount(compiler);
for (unsigned i = 0; i < regCount; ++i)
{
GenTreeFlags flags = tree->GetRegSpillFlagByIdx(i);
if ((flags & GTF_SPILL) != 0)
{
regNumber reg = tree->GetRegByIndex(i);
regSet.rsSpillTree(reg, tree, i);
gcInfo.gcMarkRegSetNpt(genRegMask(reg));
}

As such the assert in the issue is not needed. I verified that the registers marked as COPY vs. RELOAD are retrieved accurately at the use:

──────────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
TreeID   Loc RP#   Name  Type  Action    Reg  │rax  │rcx  │rdx  │rbx  │rsi  │rdi  │r8   │r9   │r12  │r13  │r14  │r15  │mm0  │mm1  │mm2  │mm6  │mm7  │
──────────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤

          70.#117  I36   Def    Alloc    rax  │I36 a│     │     │V33 a│     │     │     │     │     │     │     │     │     │     │     │     │     │
          70.#118  rdx   Fixd   Keep     rdx  │I36 a│     │     │V33 a│     │     │     │     │     │     │     │     │     │     │     │     │     │
          70.#119  I37   Def    Alloc    rdx  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │     │     │     │     │     │
          70.#120  mm0   Fixd   Keep     mm0  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │     │     │     │     │     │
          70.#121  I38   Def    Alloc    mm0  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │I38 a│     │     │     │     │
          70.#122  rcx   Fixd   Keep     rcx  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │I38 a│     │     │     │     │
          70.#123  I39   Def    Alloc    rcx  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │I38 a│     │     │     │     │
                                Spill    rcx  │I36 a│     │I37 a│V33 a│     │     │     │     │     │     │     │     │I38 a│     │     │     │     │
          ...
                                Move     rbx  │     │     │I37 a│I36 i│     │     │     │     │     │     │     │     │I38 a│     │     │     │     │
                                Move     r15  │     │     │     │     │     │     │     │     │     │     │     │I37 i│I38 a│     │     │     │     │
          93.#153  I38   Use *  Keep     mm0  │     │     │     │     │     │     │     │     │     │     │     │     │I38 i│     │     │     │     │
          93.#154  I39   Use *  ReLod    r14  │     │     │     │     │     │     │     │     │     │     │I39 a│     │     │     │     │     │     │
                                Keep     r14  │     │     │     │     │     │     │     │     │     │     │I39 i│     │     │     │     │     │     │

						;; size=99 bbWeight=1 PerfScore 14.25
G_M8513_IG03:  ;; offset=0x007C
       call     [SwiftRetAbiStress:SwiftRetFunc2():SwiftRetAbiStress+S2]
						;; size=6 bbWeight=1 PerfScore 3.00
G_M8513_IG04:  ;; offset=0x0082
       mov      dword ptr [rbp-0x5C], ecx
       mov      byte  ptr [rbx+0x04], 1
       cmp      dword ptr [(reloc 0x10a83b6e0)], 0
       je       SHORT G_M8513_IG05
       call     CORINFO_HELP_STOP_FOR_GC
						;; size=21 bbWeight=1 PerfScore 7.00
G_M8513_IG05:  ;; offset=0x0097
       mov      r15, bword ptr [rbp-0x98]
       mov      qword ptr [rbx+0x08], r15
       mov      rbx, rax
       mov      qword ptr [rbp-0x40], rbx
       mov      r15d, edx
       mov      dword ptr [rbp-0x38], r15d
       movss    dword ptr [rbp-0x34], xmm0
       mov      ecx, dword ptr [rbp-0x5C]
       mov      r14d, ecx
       mov      dword ptr [rbp-0x30], r14d
       mov      rbx, qword ptr [rbp-0x40]
       mov      qword ptr [rbp-0x48], rbx
       mov      r15, 0x114C15560      ; Xunit.Sdk.AssertEqualityComparer`1[ulong]

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 blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes Priority:2 Work that is important, but not critical for the release
Projects
None yet
5 participants