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

Assertion failed: GCHeapUtilities::GetGCHeap()->IsInFrozenSegment(obj) #82252

Closed
BruceForstall opened this issue Feb 16, 2023 · 7 comments · Fixed by #82325
Closed

Assertion failed: GCHeapUtilities::GetGCHeap()->IsInFrozenSegment(obj) #82252

BruceForstall opened this issue Feb 16, 2023 · 7 comments · Fixed by #82325
Assignees
Labels
disabled-test The test is disabled in source code against the issue
Milestone

Comments

@BruceForstall
Copy link
Member

BruceForstall commented Feb 16, 2023

Pipeline runtime-coreclr gcstress-extra
Configuration: coreclr linux arm Checked gcstress0xc_zapdisable_heapverify1 @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7

https://dev.azure.com/dnceng-public/public/_build/results?buildId=174092&view=ms.vss-test-web.build-test-results-tab&runId=3460326&paneView=debug&resultId=112277

Environment:

export DOTNET_TieredCompilation=0
export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
export DOTNET_DbgMiniDumpName=$HELIX_DUMP_FOLDER/coredump.%d.dmp
export DOTNET_GCStress=0xC
export DOTNET_HeapVerify=1
export DOTNET_ReadyToRun=0
export DOTNET_ZapDisable=1

Log fragment:

08:36:02.691 Running test: Loader/classloader/TypeGeneratorTests/TypeGeneratorTest868/Generated868/Generated868.dll
========================== Method Calling Test ==========================
========================================================================


========================== Constrained Calls Test ==========================

Assert failure(PID 21 [0x00000015], Thread: 21 [0x0015]): GCHeapUtilities::GetGCHeap()->IsInFrozenSegment(obj)
    File: /__w/1/s/src/coreclr/vm/syncblk.cpp Line: 2048
    Image: /root/helix/work/correlation/corerun

[createdump] Gathering state for process 21 corerun
[createdump] Crashing thread 00000015 signal 00000006
[createdump] Writing crash report to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp
[createdump] Written 114569216 bytes (27971 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 251ms
[createdump] waitpid() returned successfully (wstatus 00000000)
Loader/classloader/TypeGeneratorTests/TypeGeneratorTests800-899/TypeGeneratorTests800-899.sh: line 425:    21 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Expected: 100
Actual: 134
END EXECUTION - FAILED
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Pipeline runtime-coreclr gcstress-extra
Configuration: coreclr linux arm Checked gcstress0xc_zapdisable_heapverify1 @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7

Environment:

export DOTNET_TieredCompilation=0
export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
export DOTNET_DbgMiniDumpName=$HELIX_DUMP_FOLDER/coredump.%d.dmp
export DOTNET_GCStress=0xC
export DOTNET_HeapVerify=1
export DOTNET_ReadyToRun=0
export DOTNET_ZapDisable=1

Log fragment:

08:36:02.691 Running test: Loader/classloader/TypeGeneratorTests/TypeGeneratorTest868/Generated868/Generated868.dll
========================== Method Calling Test ==========================
========================================================================


========================== Constrained Calls Test ==========================

Assert failure(PID 21 [0x00000015], Thread: 21 [0x0015]): GCHeapUtilities::GetGCHeap()->IsInFrozenSegment(obj)
    File: /__w/1/s/src/coreclr/vm/syncblk.cpp Line: 2048
    Image: /root/helix/work/correlation/corerun

[createdump] Gathering state for process 21 corerun
[createdump] Crashing thread 00000015 signal 00000006
[createdump] Writing crash report to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp
[createdump] Written 114569216 bytes (27971 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 251ms
[createdump] waitpid() returned successfully (wstatus 00000000)
Loader/classloader/TypeGeneratorTests/TypeGeneratorTests800-899/TypeGeneratorTests800-899.sh: line 425:    21 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Expected: 100
Actual: 134
END EXECUTION - FAILED
Author: BruceForstall
Assignees: -
Labels:

GCStress, area-GC-coreclr

Milestone: -

@BruceForstall
Copy link
Member Author

cc @VSadov

Looks like this assert appeared before, in #12769, but it's not clear from that issue if it just "went away" or was fixed.

@EgorBo
Copy link
Member

EgorBo commented Feb 16, 2023

just a note before I'm blamed again for "Frozen" 🙂 that this assert is a typical sign of a classic gc hole, it's just that on 64bit platform we 99% hit the "padding is not zero" assert instead.

@BruceForstall
Copy link
Member Author

This failure is showing up in lots of different platform/architecture/stress combinations in runtime-coreclr libraries-jitstress-random:

https://dev.azure.com/dnceng-public/public/_build/results?buildId=175112&view=ms.vss-test-web.build-test-results-tab&runId=3472283&resultId=187374&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab

@BruceForstall
Copy link
Member Author

BruceForstall commented Feb 17, 2023

Looks like all configurations, even non-stress configurations, are failing with this assert in the runtime-coreclr libraries-jitstress pipeline:

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

cc @dotnet/jit-contrib

@BruceForstall
Copy link
Member Author

The failure is in System.Reflection.Tests.TypeDelegatorTests.FunctionPointers

Assert failure(PID 4664 [0x00001238], Thread: 32876 [0x806c]): GCHeapUtilities::GetGCHeap()->IsInFrozenSegment((Object*)pointer)

CORECLR! CEEInfo::getRuntimeTypePointer + 0x1D6 (0x00007ffc`e6edbaf6)
CLRJIT! Compiler::fgMorphCall + 0x35B (0x00007ffd`4ae95f6b)
CLRJIT! Compiler::fgMorphTree + 0x392 (0x00007ffd`4aea13d2)
CLRJIT! Compiler::fgMorphSmpOp + 0x13FC (0x00007ffd`4ae9e66c)
CLRJIT! Compiler::fgMorphTree + 0x331 (0x00007ffd`4aea1371)
CLRJIT! Compiler::fgMorphStmts + 0xDF (0x00007ffd`4aea041f)
CLRJIT! Compiler::fgMorphBlocks + 0x111 (0x00007ffd`4ae95b31)
CLRJIT! ActionPhase<`Compiler::compCompile'::`2'::<lambda_2> >::DoPhase + 0x1C (0x00007ffd`4ad3f23c)
CLRJIT! Phase::Run + 0x76 (0x00007ffd`4aecd436)
CLRJIT! Compiler::compCompile + 0xB6E (0x00007ffd`4ad448de)
    File: C:\gh\runtime2\src\coreclr\vm\jitinterface.cpp Line: 5934

This is a new test introduced in #81006 along with extensive other changes.

@steveharter Can you disable this test ASAP (and any other test that might fail in the libraries-jitstress pipeline)?

cc @jkotas

@ghost
Copy link

ghost commented Feb 17, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.

Issue Details

Pipeline runtime-coreclr gcstress-extra
Configuration: coreclr linux arm Checked gcstress0xc_zapdisable_heapverify1 @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7

https://dev.azure.com/dnceng-public/public/_build/results?buildId=174092&view=ms.vss-test-web.build-test-results-tab&runId=3460326&paneView=debug&resultId=112277

Environment:

export DOTNET_TieredCompilation=0
export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
export DOTNET_DbgMiniDumpName=$HELIX_DUMP_FOLDER/coredump.%d.dmp
export DOTNET_GCStress=0xC
export DOTNET_HeapVerify=1
export DOTNET_ReadyToRun=0
export DOTNET_ZapDisable=1

Log fragment:

08:36:02.691 Running test: Loader/classloader/TypeGeneratorTests/TypeGeneratorTest868/Generated868/Generated868.dll
========================== Method Calling Test ==========================
========================================================================


========================== Constrained Calls Test ==========================

Assert failure(PID 21 [0x00000015], Thread: 21 [0x0015]): GCHeapUtilities::GetGCHeap()->IsInFrozenSegment(obj)
    File: /__w/1/s/src/coreclr/vm/syncblk.cpp Line: 2048
    Image: /root/helix/work/correlation/corerun

[createdump] Gathering state for process 21 corerun
[createdump] Crashing thread 00000015 signal 00000006
[createdump] Writing crash report to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp.crashreport.json
[createdump] Crash report successfully written
[createdump] Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.21.dmp
[createdump] Written 114569216 bytes (27971 pages) to core file
[createdump] Target process is alive
[createdump] Dump successfully written in 251ms
[createdump] waitpid() returned successfully (wstatus 00000000)
Loader/classloader/TypeGeneratorTests/TypeGeneratorTests800-899/TypeGeneratorTests800-899.sh: line 425:    21 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Expected: 100
Actual: 134
END EXECUTION - FAILED
Author: BruceForstall
Assignees: -
Labels:

area-System.Reflection, GCStress, untriaged

Milestone: -

@BruceForstall BruceForstall added this to the 8.0.0 milestone Feb 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 17, 2023
@BruceForstall BruceForstall added untriaged New issue has not been triaged by the area owner blocking-clean-ci-optional Blocking optional rolling runs and removed GCStress untriaged New issue has not been triaged by the area owner labels Feb 17, 2023
BruceForstall added a commit to BruceForstall/runtime that referenced this issue Feb 17, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 17, 2023
BruceForstall added a commit that referenced this issue Feb 18, 2023
jkotas added a commit to jkotas/runtime that referenced this issue Feb 18, 2023
The code was missing support for allocating RuntimeType objects on frozen heap

Fixes dotnet#82252
@BruceForstall BruceForstall added the disabled-test The test is disabled in source code against the issue label Feb 18, 2023
jkotas added a commit that referenced this issue Feb 18, 2023
* Fix FnPtrTypeDesc::GetManagedClassObject

The code was missing support for allocating RuntimeType objects on frozen heap

Fixes #82252

* Revert "Disable System.Reflection.Tests.TypeDelegatorTests.FunctionPointers (#82321)"

This reverts commit 473e278.
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 18, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants