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

[RISC-V][LoongArch64] Encode missing tailcall in GC info #109512

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

tomeksowi
Copy link
Contributor

Fixes intermittent crashes with GCStress=0x3 in baseservices/TieredCompilation/TieredVtableMethodTests/TieredVtableMethodTests.sh

In Checked mode usually this assertion failed:

        Assert failure(PID 1318399 [0x00141dff], Thread: 1319035 [0x14207b]): !CREATE_CHECK_STRING(pMT && pMT->Validate())
            File: /runtime/src/coreclr/vm/object.cpp:553
            Image: /runtime/artifacts/tests/coreclr/linux.riscv64.Checked/Tests/Core_Root/corerun

but sometimes also on this check: pMT->Validate() fails on SanityCheck() on _ASSERTE((GetComponentSize() <= 2) || IsArray()).

The problem occurred with hijacking and matched the explanation in comment from dotnet/coreclr#16039:

else if (pCF->HasTailCalls())
{
// Do not hijack functions that have tail calls, since there are two problems:
// 1. When a function that tail calls another one is hijacked, the LR may be
// stored at a different location in the stack frame of the tail call target.
// So just by performing tail call, the hijacked location becomes invalid and
// unhijacking would corrupt stack by writing to that location.
// 2. There is a small window after the caller pops LR from the stack in its
// epilog and before the tail called function pushes LR in its prolog when
// the hijacked return address would not be not on the stack and so we would
// not be able to unhijack.
notJittedCase = true;
}

Part of #84834, cc @dotnet/samsung @shushanhf @LuckyXu-HF

@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 Nov 4, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 4, 2024
Copy link
Contributor

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

@risc-vv
Copy link

risc-vv commented Nov 4, 2024

RISC-V Release-CLR-QEMU: 9422 / 9443 (99.78%)
=======================
      passed: 9422
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9550
 TOTAL tests: 9550
   REAL time: 57min 39s 420ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 591645 / 624137 (94.79%)
=======================
      passed: 591645
      failed: 1094
     skipped: 1586
      killed: 31398
------------------------
  TOTAL libs: 257
 TOTAL tests: 625723
   REAL time: 1h 24min 14s 375ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: aa5542bd1a05c9c66279fd55559cd8075213b2ce
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cp -R /godata/pipelines/Release-CLR-QEMU/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=
RISC-V Release-CLR-VF2: 9422 / 9443 (99.78%)
=======================
      passed: 9422
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9550
 TOTAL tests: 9550
   REAL time: 3h 8min 17s 40ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 565950 / 607179 (93.21%)
=======================
      passed: 565950
      failed: 870
     skipped: 1469
      killed: 40359
------------------------
  TOTAL libs: 257
 TOTAL tests: 608648
   REAL time: 2h 39min 42s 276ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: aa5542bd1a05c9c66279fd55559cd8075213b2ce
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cp -R /var/lib/go-agent/pipelines/Release-CLR-VF2/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=
RISC-V Release-CLR-QEMU: 9423 / 9444 (99.78%)
=======================
      passed: 9423
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9551
 TOTAL tests: 9551
   REAL time: 57min 55s 426ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 591645 / 624137 (94.79%)
=======================
      passed: 591645
      failed: 1094
     skipped: 1586
      killed: 31398
------------------------
  TOTAL libs: 257
 TOTAL tests: 625723
   REAL time: 1h 24min 14s 375ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: aa5542bd1a05c9c66279fd55559cd8075213b2ce
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cp -R /godata/pipelines/Release-CLR-QEMU/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=
RISC-V Release-CLR-VF2: 9423 / 9444 (99.78%)
=======================
      passed: 9423
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9551
 TOTAL tests: 9551
   REAL time: 2h 54min 41s 885ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 565950 / 607179 (93.21%)
=======================
      passed: 565950
      failed: 870
     skipped: 1469
      killed: 40359
------------------------
  TOTAL libs: 257
 TOTAL tests: 608648
   REAL time: 2h 39min 42s 276ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: aa5542bd1a05c9c66279fd55559cd8075213b2ce
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cp -R /var/lib/go-agent/pipelines/Release-CLR-VF2/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=

@tomeksowi
Copy link
Contributor Author

tomeksowi commented Nov 4, 2024

but sometimes also on this check: pMT->Validate() fails on SanityCheck() on _ASSERTE((GetComponentSize() <= 2) || IsArray()).

@t-mustafin This symptom is similar to #105808. Does this PR solve your problem?

@LuckyXu-HF
Copy link
Contributor

LuckyXu-HF commented Nov 5, 2024

@tomeksowi thanks very much for notification.

We have tested baseservices/TieredCompilation/TieredVtableMethodTests/TieredVtableMethodTests.sh under both Checked mode and Debug mode with export DOTNET_GCStress=3 on LA64, we can always pass this testcase whether or not add this PR with several times:

  • Checked CoreRoot test Checked testcase with export DOTNET_GCStress=3:
BEGIN EXECUTION
/home/xuliangyu/fork/runtime/artifacts/tests/coreclr/linux.loongarch64.Checked/Tests/Core_Root///corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true TieredVtableMethodTests.dll ''
Expected: 100
Actual: 100
END EXECUTION - PASSED
  • Debug CoreRoot test Debug testcase export DOTNET_GCStress=3:
BEGIN EXECUTION
/home/xuliangyu/fork/runtime/artifacts/tests/coreclr/linux.loongarch64.Debug/Tests/Core_Root///corerun -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true TieredVtableMethodTests.dll ''
Expected: 100
Actual: 100
END EXECUTION - PASSED

If I missed some test detail information please let me know, thank you.

@tomeksowi
Copy link
Contributor Author

We have tested baseservices/TieredCompilation/TieredVtableMethodTests/TieredVtableMethodTests.sh under both Checked mode and Debug mode with export DOTNET_GCStress=3 on LA64, we can always pass this testcase whether or not add this PR with several times:

Thank you for testing, glad it works. I saw LA like RISC-V has most of the #ifdefs introduced in dotnet/coreclr#16039 but not the ones that encode the GC info. Do you agree this PR also makes sense for LA?

@LuckyXu-HF
Copy link
Contributor

We have tested baseservices/TieredCompilation/TieredVtableMethodTests/TieredVtableMethodTests.sh under both Checked mode and Debug mode with export DOTNET_GCStress=3 on LA64, we can always pass this testcase whether or not add this PR with several times:

Thank you for testing, glad it works. I saw LA like RISC-V has most of the #ifdefs introduced in dotnet/coreclr#16039 but not the ones that encode the GC info. Do you agree this PR also makes sense for LA?

Yes, I think LA64 also need this.
LGTM, thanks!

@risc-vv
Copy link

risc-vv commented Nov 5, 2024

RISC-V Release-CLR-VF2: 9423 / 9444 (99.78%)
=======================
      passed: 9423
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9551
 TOTAL tests: 9551
   REAL time: 2h 54min 41s 885ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 580360 / 617580 (93.97%)
=======================
      passed: 580360
      failed: 867
     skipped: 1470
      killed: 36353
------------------------
  TOTAL libs: 257
 TOTAL tests: 619050
   REAL time: 2h 36min 13s 26ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 09c454d42d03a5cc242682d8fa3b780a536f75bf
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cp -R /var/lib/go-agent/pipelines/Release-CLR-VF2/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=
RISC-V Release-CLR-QEMU: 9423 / 9444 (99.78%)
=======================
      passed: 9423
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9551
 TOTAL tests: 9551
   REAL time: 57min 55s 426ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 614071 / 641431 (95.73%)
=======================
      passed: 614071
      failed: 1095
     skipped: 1586
      killed: 26265
------------------------
  TOTAL libs: 257
 TOTAL tests: 643017
   REAL time: 2h 26min 40s 950ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 09c454d42d03a5cc242682d8fa3b780a536f75bf
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cp -R /godata/pipelines/Release-CLR-QEMU/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=
RISC-V Release-CLR-QEMU: 9424 / 9445 (99.78%)
=======================
      passed: 9424
      failed: 4
     skipped: 107
      killed: 17
------------------------
  TOTAL libs: 9552
 TOTAL tests: 9552
   REAL time: 57min 56s 240ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 614071 / 641431 (95.73%)
=======================
      passed: 614071
      failed: 1095
     skipped: 1586
      killed: 26265
------------------------
  TOTAL libs: 257
 TOTAL tests: 643017
   REAL time: 2h 26min 40s 950ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 09c454d42d03a5cc242682d8fa3b780a536f75bf
CI: 22c18a07455c9b7fa222cc5b1e07672ffa453212
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UsePublishedCrossgen2=false -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG --xunit xunit.Release
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cp -R /godata/pipelines/Release-CLR-QEMU/xunit.Release "/_PATH_/_WITH_/_TEST_"/ ; cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
unknown command
# TESTFX_RUN
unknown command

# TEST_ENV
DOTNET_JitStress=;DOTNET_JitStressRegs=;DOTNET_GCStress=;DOTNET_JITMinOpts=;DOTNET_TailcallStress=;DOTNET_TieredCompilation=

@t-mustafin
Copy link
Contributor

but sometimes also on this check: pMT->Validate() fails on SanityCheck() on _ASSERTE((GetComponentSize() <= 2) || IsArray()).

@t-mustafin This symptom is similar to #105808. Does this PR solve your problem?

@tomeksowi seems to be great finding! I reproduced a problem on current main (6 fails/10 launches, checked build) and started loop testing of main with this patch for night. Now it is 0 fails/ 8 launches, I will return tomorrow with detailed statistics.

@t-mustafin
Copy link
Contributor

@tomeksowi night testing showed 0 fails/ 477 launches, so this PR solves my problem with System.Diagnostics.Tests.DiagnosticSourceTest.AllSubscriberStress.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit c20fe5f into dotnet:main Nov 15, 2024
109 checks passed
mikelle-rogers pushed a commit to mikelle-rogers/runtime that referenced this pull request Dec 10, 2024
* Encode missing tailcall in GC info

* Documentation typos
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-riscv Related to the RISC-V architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants