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

Failures in checked/release asm diffs #79560

Closed
BrianBohe opened this issue Dec 12, 2022 · 6 comments · Fixed by #79844
Closed

Failures in checked/release asm diffs #79560

BrianBohe opened this issue Dec 12, 2022 · 6 comments · Fixed by #79844
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
Milestone

Comments

@BrianBohe
Copy link
Member

Description

Pipeline runtime-coreclr superpmi-asmdiffs-checked-release has found some diff on assembly generated with checked and release version using windows x64 with clrjit_unix_x64_x64.

Example:

[10:41:11] Running asm diffs of C:\h\w\BA220A09\p\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\benchmarks.run.Linux.x64.checked.mch

[10:41:11] Invoking: C:\h\w\BA220A09\p\superpmi.exe -a -v ewmi -f C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_diffs.csv -r C:\h\w\BA220A09\t\tmpg2oe46bn\repro -baseMetricsSummary C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\h\w\BA220A09\p\base\clrjit_unix_x64_x64.dll C:\h\w\BA220A09\p\diff\clrjit_unix_x64_x64.dll C:\h\w\BA220A09\p\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\benchmarks.run.Linux.x64.checked.mch

[10:42:26] ISSUE: <ASM_DIFF> main method 14637 of size 6076 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 36173 of size 312 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52705 of size 376 differs

[10:42:26] MISSING: Method context 13610 failed to replay: repGetFieldInfo: didn't find 4001b9e

[10:42:26] MISSING: Method context 13610 failed to replay: repGetFieldInfo: didn't find 4001b9e

[10:42:26] ISSUE: <ASM_DIFF> main method 47778 of size 887 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 26563 of size 485 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52703 of size 20 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 59779 of size 443 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52700 of size 17 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52708 of size 464 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 54972 of size 950 differs

[10:42:26] return_code: 2

[10:42:26] Asm diffs found

[10:42:26] Method numbers with compilation failures:

[10:42:26] 13610

All log on https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-3b77ca8ead1344baa1/unix-x64/1/console.82b2c8cb.log?helixlogtype=result

Reproduction Steps

  1. Take a clean clone up to date of the repository on main branch
  2. Build x64 checked and release with .\build.cmd clr+libs -rc checked -lc release; .\src\tests\build.cmd checked generatelayoutonly;.\build.cmd clr+libs -rc release -lc release; .\src\tests\build.cmd release generatelayoutonly;
  3. Run python <repo_path>\src\coreclr\scripts\superpmi_asmdiffs_checked_release.py --diff_with_release -base_jit_directory <repo_path>\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\ -diff_jit_directory <repo_path>\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\ -log_directory <log_path> -arch x64 -platform Linux

Expected behavior

No diff found

Actual behavior

Many diffs found:

[12:51:31] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.crossgen2.Linux.x64.checked.mch
[12:51:31] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.crossgen2.Linux.x64.checked.mch
[12:51:42] ISSUE: <ASM_DIFF> main method 6962 of size 513 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 166962 of size 678 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 101567 of size 775 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 15089 of size 196 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 10351 of size 887 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 150435 of size 696 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 154877 of size 503 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 144040 of size 165 differs
[12:51:42] return_code: 2
[12:51:42] Asm diffs found
[12:51:42] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.pmi.Linux.x64.checked.mch
[12:51:42] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.pmi.Linux.x64.checked.mch
[12:52:04] ISSUE: <ASM_DIFF> main method 150061 of size 503 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187941 of size 288 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187981 of size 272 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 233441 of size 696 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 248441 of size 207 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 212382 of size 775 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 10885 of size 329 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187945 of size 492 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 205025 of size 671 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 188006 of size 6076 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 188306 of size 1154 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 203666 of size 678 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 190487 of size 274 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 126108 of size 623 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187908 of size 485 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187928 of size 305 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 11549 of size 249 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187930 of size 419 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 100731 of size 41 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187912 of size 801 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 119736 of size 505 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 205016 of size 301 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 158757 of size 580 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187977 of size 305 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 173018 of size 323 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 246178 of size 150 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187979 of size 419 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 174100 of size 253 differs
[12:52:04] return_code: 2
[12:52:04] Asm diffs found
[12:52:04] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries_tests.pmi.Linux.x64.checked.mch
[12:52:04] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries_tests.pmi.Linux.x64.checked.mch
[12:52:52] ISSUE: <ASM_DIFF> main method 284861 of size 372 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178743 of size 272 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233483 of size 924 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 86265 of size 787 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 179865 of size 856 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 171686 of size 775 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283366 of size 700 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283386 of size 681 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283406 of size 901 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178068 of size 71 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233549 of size 1093 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81870 of size 323 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 85450 of size 598 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178751 of size 287 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233472 of size 744 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233512 of size 279 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283392 of size 631 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81673 of size 776 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81634 of size 247 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283374 of size 704 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 305074 of size 696 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 83699 of size 522 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178739 of size 262 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 284859 of size 348 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283380 of size 654 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283400 of size 1063 differs
[12:52:52] return_code: 2

Regression?

No response

Known Workarounds

No response

Configuration

linux x64 jit dll, from a x64 checked and release built of coreclr

Other information

No response

@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

Description

Pipeline runtime-coreclr superpmi-asmdiffs-checked-release has found some diff on assembly generated with checked and release version using windows x64 with clrjit_unix_x64_x64.

Example:

[10:41:11] Running asm diffs of C:\h\w\BA220A09\p\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\benchmarks.run.Linux.x64.checked.mch

[10:41:11] Invoking: C:\h\w\BA220A09\p\superpmi.exe -a -v ewmi -f C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_diffs.csv -r C:\h\w\BA220A09\t\tmpg2oe46bn\repro -baseMetricsSummary C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\h\w\BA220A09\t\tmpg2oe46bn\benchmarks.run.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\h\w\BA220A09\p\base\clrjit_unix_x64_x64.dll C:\h\w\BA220A09\p\diff\clrjit_unix_x64_x64.dll C:\h\w\BA220A09\p\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\benchmarks.run.Linux.x64.checked.mch

[10:42:26] ISSUE: <ASM_DIFF> main method 14637 of size 6076 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 36173 of size 312 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52705 of size 376 differs

[10:42:26] MISSING: Method context 13610 failed to replay: repGetFieldInfo: didn't find 4001b9e

[10:42:26] MISSING: Method context 13610 failed to replay: repGetFieldInfo: didn't find 4001b9e

[10:42:26] ISSUE: <ASM_DIFF> main method 47778 of size 887 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 26563 of size 485 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52703 of size 20 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 59779 of size 443 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52700 of size 17 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 52708 of size 464 differs

[10:42:26] ISSUE: <ASM_DIFF> main method 54972 of size 950 differs

[10:42:26] return_code: 2

[10:42:26] Asm diffs found

[10:42:26] Method numbers with compilation failures:

[10:42:26] 13610

All log on https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-3b77ca8ead1344baa1/unix-x64/1/console.82b2c8cb.log?helixlogtype=result

Reproduction Steps

  1. Take a clean clone up to date of the repository on main branch
  2. Build x64 checked and release with .\build.cmd clr+libs -rc checked -lc release; .\src\tests\build.cmd checked generatelayoutonly;.\build.cmd clr+libs -rc release -lc release; .\src\tests\build.cmd release generatelayoutonly;
  3. Run python <repo_path>\src\coreclr\scripts\superpmi_asmdiffs_checked_release.py --diff_with_release -base_jit_directory <repo_path>\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\ -diff_jit_directory <repo_path>\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\ -log_directory <log_path> -arch x64 -platform Linux

Expected behavior

No diff found

Actual behavior

Many diffs found:

[12:51:31] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.crossgen2.Linux.x64.checked.mch
[12:51:31] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.crossgen2.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.crossgen2.Linux.x64.checked.mch
[12:51:42] ISSUE: <ASM_DIFF> main method 6962 of size 513 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 166962 of size 678 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 101567 of size 775 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 15089 of size 196 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 10351 of size 887 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 150435 of size 696 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 154877 of size 503 differs
[12:51:42] ISSUE: <ASM_DIFF> main method 144040 of size 165 differs
[12:51:42] return_code: 2
[12:51:42] Asm diffs found
[12:51:42] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.pmi.Linux.x64.checked.mch
[12:51:42] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries.pmi.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries.pmi.Linux.x64.checked.mch
[12:52:04] ISSUE: <ASM_DIFF> main method 150061 of size 503 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187941 of size 288 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187981 of size 272 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 233441 of size 696 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 248441 of size 207 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 212382 of size 775 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 10885 of size 329 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187945 of size 492 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 205025 of size 671 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 188006 of size 6076 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 188306 of size 1154 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 203666 of size 678 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 190487 of size 274 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 126108 of size 623 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187908 of size 485 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187928 of size 305 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 11549 of size 249 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187930 of size 419 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 100731 of size 41 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187912 of size 801 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 119736 of size 505 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 205016 of size 301 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 158757 of size 580 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187977 of size 305 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 173018 of size 323 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 246178 of size 150 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 187979 of size 419 differs
[12:52:04] ISSUE: <ASM_DIFF> main method 174100 of size 253 differs
[12:52:04] return_code: 2
[12:52:04] Asm diffs found
[12:52:04] Running asm diffs of C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries_tests.pmi.Linux.x64.checked.mch
[12:52:04] Invoking: C:\runtimes\runtime2\artifacts\bin\coreclr\windows.x64.Checked\superpmi.exe -a -v ewmi -f C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_fail.mcl -diffsInfo C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_diffs.csv -r C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\repro -baseMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_base_metrics.csv -diffMetricsSummary C:\Users\BRIANB\~1\AppData\Local\Temp\tmp1k7yiyun\libraries_tests.pmi.Linux.x64.checked.mch_diff_metrics.csv -p -failureLimit 100 -ignoreStoredConfig C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\artifacts\tests\coreclr\windows.x64.Checked\Tests\Core_Root\clrjit_unix_x64_x64.dll C:\runtimes\runtime2\src\coreclr\scripts\artifacts\spmi\mch\aaa9536e-1295-4741-a7d9-6c09a5b01512.Linux.x64\libraries_tests.pmi.Linux.x64.checked.mch
[12:52:52] ISSUE: <ASM_DIFF> main method 284861 of size 372 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178743 of size 272 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233483 of size 924 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 86265 of size 787 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 179865 of size 856 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 171686 of size 775 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283366 of size 700 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283386 of size 681 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283406 of size 901 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178068 of size 71 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233549 of size 1093 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81870 of size 323 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 85450 of size 598 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178751 of size 287 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233472 of size 744 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 233512 of size 279 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283392 of size 631 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81673 of size 776 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 81634 of size 247 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283374 of size 704 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 305074 of size 696 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 83699 of size 522 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 178739 of size 262 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 284859 of size 348 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283380 of size 654 differs
[12:52:52] ISSUE: <ASM_DIFF> main method 283400 of size 1063 differs
[12:52:52] return_code: 2

Regression?

No response

Known Workarounds

No response

Configuration

linux x64 jit dll, from a x64 checked and release built of coreclr

Other information

No response

Author: BrianBohe
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@BrianBohe BrianBohe added the blocking-clean-ci-optional Blocking optional rolling runs label Dec 12, 2022
@BrianBohe
Copy link
Member Author

The last known commit without diffs is #79136 (one week ago), I will bisect later to get the commit introducing it

@BruceForstall BruceForstall added this to the 8.0.0 milestone Dec 19, 2022
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Dec 19, 2022
@BruceForstall
Copy link
Member

I'll look into this failure.

@BrianBohe
Copy link
Member Author

I git bisected this and the commit introducing the failure is e1081df in PR

@BruceForstall
Copy link
Member

BruceForstall commented Dec 20, 2022

I'm looking at a Checked/Release diff in Linux/x64 in Jil.Deserialize.Methods:_ReadSkipWhitespaceThunkReader(byref):int in the benchmarks collection (MC#45480 in my collection). The diff is only in GC info.

Before #79194, we have (for a fragment):

0001DA 488D7D90             lea      rdi, bword ptr [rbp-70H]
0001DE 8BF1                 mov      esi, ecx
0001E0 FF1500000000         call     [System.ReadOnlyMemory`1[ushort]:Slice(int,int):System.ReadOnlyMemory`1[ushort]:this]
0001E6 48898578FFFFFF       mov      gword ptr [rbp-88H], rax
0001ED 48895580             mov      qword ptr [rbp-80H], rdx
0001F1 488DB578FFFFFF       lea      rsi, bword ptr [rbp-88H]
0001F8 498BFF               mov      rdi, r15
0001FB E800000000           call     CORINFO_HELP_ASSIGN_BYREF
000200 48A5                 movsq    
000202 E92B010000           jmp      G_M26160_IG15

after:

0001DA 488D7D90             lea      rdi, [rbp-70H]
0001DE 8BF1                 mov      esi, ecx
0001E0 FF1500000000         call     [System.ReadOnlyMemory`1[ushort]:Slice(int,int):System.ReadOnlyMemory`1[ushort]:this]
0001E6 48898578FFFFFF       mov      gword ptr [rbp-88H], rax
0001ED 48895580             mov      qword ptr [rbp-80H], rdx
0001F1 488DB578FFFFFF       lea      rsi, [rbp-88H]
0001F8 498BFF               mov      rdi, r15
0001FB E800000000           call     CORINFO_HELP_ASSIGN_BYREF
000200 48A5                 movsq    
000202 E92B010000           jmp      G_M26160_IG15

So, the bword ptr have disappeared, since they don't need to be byref pointers since they're on the stack. In the Checked GC info, the live ranges also go away.

In the Checked/Release diffs, we have an additional live range in the Release case for rsi after the helper call:

0001F1 488DB578FFFFFF       lea      rsi, [rbp-88H]
0001F8 498BFF               mov      rdi, r15
0001FB E800000000           call     CORINFO_HELP_ASSIGN_BYREF
; *** rsi as byref goes live here
000200 48A5                 movsq
000202 E92B010000           jmp      G_M26160_IG15
; *** rsi as byref dies here
                        ;; size=76 bbWeight=2    PerfScore 43.00
G_M26160_IG08:              ;; offset=0207H
000207 483BB538FFFFFF       cmp      rsi, gword ptr [rbp-C8H]

Note that before #79194, there was a live range for rsi as byref that overlapped this:

0001F1 488DB578FFFFFF       lea      rsi, bword ptr [rbp-88H]
; *** rsi as byref goes live here
0001F8 498BFF               mov      rdi, r15
0001FB E800000000           call     CORINFO_HELP_ASSIGN_BYREF
000200 48A5                 movsq
000202 E92B010000           jmp      G_M26160_IG15
; *** rsi as byref dies here
                        ;; size=76 bbWeight=2    PerfScore 43.00
G_M26160_IG08:              ;; offset=0207H
000207 483BB538FFFFFF       cmp      rsi, gword ptr [rbp-C8H]

@BruceForstall
Copy link
Member

This issue is code in codegenxarch.cpp, genCodeForCpObj(), that is under #ifdef DEBUG but has side effects. The code has been this way for years. Change #79194 triggered it because it changed the type of local addresses as the source of STORE_OBJ from byref to long, e.g.:

Before:

t622 =    LCL_VAR_ADDR byref  V50 tmp48         rsi REG rsi
       /--*  t622   byref
t625 = *  IND       struct REG NA
       /--*  t388   byref
       +--*  t625   struct
       *  STORE_OBJ struct<System.ReadOnlyMemory`1, 16> (copy) (Unroll) REG NA $341

after:

t623 =    LCL_VAR_ADDR long   V50 tmp48         rsi REG rsi $299
       /--*  t623   long
t625 = *  IND       struct REG NA
       /--*  t388   byref
       +--*  t625   struct
       *  STORE_OBJ struct<System.ReadOnlyMemory`1, 16> (copy) (Unroll) REG NA $341

BruceForstall added a commit to BruceForstall/runtime that referenced this issue Dec 20, 2022
Code inside a `#ifdef DEBUG` had a side-effect not visible to
Release builds. Pull that code out of the `#ifdef`.

Fixes dotnet#79560
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 20, 2022
BruceForstall added a commit that referenced this issue Dec 21, 2022
Code inside a `#ifdef DEBUG` had a side-effect not visible to
Release builds. Pull that code out of the `#ifdef`.

Fixes #79560
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 20, 2023
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants