Skip to content

[Win 7, Linux/x64] Tests fail with COMPlus_JitELTHookEnabled #7228

@kvochko

Description

@kvochko

The following tests fail in Windows and Linux (with PR dotnet/coreclr#7719) builds of CoreCLR when COMPlus_JitELTHookEnabled environment variable is set to 1:

JIT/Methodical/Arrays/misc/_dbgarrres/_dbgarrres
JIT/Methodical/Arrays/misc/_relarrres/_relarrres
GC/API/GC/KeepAlive
GC/Scenarios/Samples/gc/gc
GC/Scenarios/LeakGen/leakgen/leakgen
GC/Scenarios/WeakReference/weakreffinal/weakreffinal

If we look at the KeepAlive test, after line 59 (https://github.com/dotnet/coreclr/blob/033b11d631f346a55c4d7c453bca1f49f77a44d5/tests/src/GC/API/GC/KeepAlive.cs#L59) object obj2 can be collected by GC. Without the COMPlus_JitELTHookEnabled, gcroot shows the following and, as expected, the object gets collected after line 61:

(lldb) gcroot 00007fff6006c3a0
Finalizer Queue:
    00007FFF6006C3A0
    -> 00007FFF6006C3A0 Test+Dummy2

With COMPlus_JitELTHookEnabled=1, gcroot shows:

(lldb) gcroot 00007fff6006c3a0
Thread 7338:
    00007FFFFFFFC880 00007FFF7D717F3E Test.RunTest() [/home/akvochko/projects/KeepAlive/KeepAlive.cs @ 60]
        rbp-30: 00007fffffffc880
            ->  00007FFF6006C3A0 Test+Dummy2

and the object does not get collected.
What could be the possible reason for this behavior? Is it correct to run this test with profiling enabled?
The remaining 5 tests show a similar behavior.

@janvorli @sivarv @BruceForstall
CC: @Dmitri-Botcharnikov @sergign60
category:correctness
theme:gc-info
skill-level:intermediate
cost:medium

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbugos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions