Skip to content

RyuJIT/x86: CoreFx System.Dynamic.Runtime.Tests Assertion failed '!"We should never encounter a reference to a lclVar that has a zero refCnt." #7035

Closed

Description

@RussKeldorph

Commits:
dbf8ce1173faf78b176771946b0bca9f9863bc9b
dotnet/corefx@0d623b5

Repro:
coreclr (assuming root=c:\git\coreclr)

build x86 checked skiptests

corefx (assuming root=c:\git\corefx)

build -Release -SkipTests -- /p:BUILDTOOLS_OVERRIDE_RUNTIME=c:\git\coreclr\bin\Product\Windows_NT.x64.Checked
cd bin\tests\AnyOS.AnyCPU.Release\System.Dynamic.Runtime.Tests\default.netcoreapp1.1
set COMPlus_AltJit=*
set COMPlus_AltJitName=protojit.dll
RunTests.cmd c:\git\corefx\packages

Output

Using c:\git\coref2\packages as folder for resolving package dependencies.
Executing in C:\git\coref2\bin\tests\AnyOS.AnyCPU.Release\System.Dynamic.Runtime.Tests\default.netcoreapp1.1\
Hard linking dependent files...
Finished linking needed files, moving to running tests.
Running tests... Start time: 15:20:12.61
Command(s):
call CoreRun.exe xunit.console.netcore.exe System.Dynamic.Runtime.Tests.dll  -xml testResults.xml -notrait Benchmark=true -notrait category=nonnetcoreapp1.1tests  -notrait category=OuterLoop -notrait category=failing -notrait category=nonwindowstests
xUnit.net console test runner (32-bit .NET Core)
Copyright (C) 2014 Outercurve Foundation.

Discovering: System.Dynamic.Runtime.Tests
Discovered:  System.Dynamic.Runtime.Tests
Starting:    System.Dynamic.Runtime.Tests

Assert failure(PID 15164 [0x00003b3c], Thread: 8412 [0x20dc]): Assertion failed '!"We should never encounter a reference to a lclVar that has a zero refCnt."' in 'DynamicClass:CallSite.Target(ref,ref,ref,ref):ref' (IL size 162)

    File: c:\git\corecl2\src\jit\liveness.cpp Line: 55
    Image: C:\git\coref2\bin\tests\AnyOS.AnyCPU.Release\System.Dynamic.Runtime.Tests\default.netcoreapp1.1\CoreRun.exe

Finished running tests.  End time=15:25:55.95, Exit code = 123456789

Activity

  1. RussKeldorph commented on Nov 22, 2016

    @RussKeldorph
    ContributorAuthor

    @dotnet/jit-contrib

  2. self-assigned this
    on Nov 23, 2016
  3. pgavlin commented on Nov 23, 2016

    @pgavlin
    Contributor

    This appears to be an issue with fgMorphCopyBlock, which does not appear to be properly updating ref counts when performing a field-by-field assignment.

    cc @CarolEidt

  4. RussKeldorph commented on Nov 23, 2016

    @RussKeldorph
    ContributorAuthor

    This hits on x64 as well. Removing x86 label.

  5. pgavlin commented on Nov 23, 2016

    @pgavlin
    Contributor

    fgMorphCopyBlock turned out to be a red herring: fgMarkLocalVars runs after global morphing, so transformations that only occur as part of global morph do not need to update ref counts.

    It appears that the issue is morph-related, but is due to remorphing that occurs after performing VN-based constant propagation. The remorph in question duplicates a lclVar node but does not appear to update the ref counts properly.

  6. transferred this issue fromdotnet/coreclron Jan 31, 2020
  7. ghost locked as resolved and limited conversation to collaborators on Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions