dotnet / diagnostics

This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
MIT License
1.18k stars 355 forks source link

CLRMD floods logs with `EnumerateStackRoots found an entry with Object == 0, addr:73664ff040 srcType:0` while enumerating root paths for core dump created under linux #4484

Open koepalex opened 7 months ago

koepalex commented 7 months ago

Description

I updated the Microsoft.Diagnostics.Runtime from 3.0.0-beta.23214.4 to 3.1.456101 and the following code:

var dataTarget = DataTarget.LoadDump(pathToDump);
var runtime = dataTarget.ClrVersions.Single().CreateRuntime();
var heap = runtime.Heap;
var gcRootForX = new GCRoot(
                            heap,
                            objectInstancesToLookup);
foreach ((var root, var path) in gcRootForX.EnumerateRootPaths(cancellationToken))
{
    // ...
}

it spams the console with log messages like:

EnumerateStackRoots found an entry with Object == 0, addr:73664fefe0 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664fefe8 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664feff0 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff000 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff008 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff018 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff020 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff028 srcType:0
EnumerateStackRoots found an entry with Object == 0, addr:73664ff030 srcType:0

I'm not sure what to do with this information, and it bloats my console output.

So my questions are:

Configuration

Regression?

Not really, the error log seems to be added.

Other information

mikem8361 commented 7 months ago

This is an issue in CLRMD which is in the https://github.com/Microsoft/clrmd. Assigning to Lee.

leculver commented 7 months ago

This should already be fixed in ClrMD. If the diagnostics team is still picking up daily builds then the fix is already in the diagnostics repo, it's just waiting for a release.

leculver commented 7 months ago

Oh, this is about ClrMD specifically. Yes it's fixed in our devbranch. I'll push a new build to NuGet tomorrow.