diagnostics
diagnostics copied to clipboard
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
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:
- What can cause such an issue? (Is this related to the different stack handling under linux, see #4198)
- Would it be possible to get an additional parameter
bool traceErrors
like EnumerateStackTrace has internally?
Configuration
- Is this related to a specific tool?
no
- What OS and version, and what distro if applicable?
Win11
- What is the architecture (x64, x86, ARM, ARM64)?
x64
- Do you know whether it is specific to that configuration?
- Are you running in any particular type of environment? (e.g. Containers, a cloud scenario, app you are trying to target is a different user)
net7.0-windows console application
- Is it a self-contained published application?
no
Regression?
Not really, the error log seems to be added.
Other information
This is an issue in CLRMD which is in the https://github.com/Microsoft/clrmd. Assigning to Lee.
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.
Oh, this is about ClrMD specifically. Yes it's fixed in our devbranch. I'll push a new build to NuGet tomorrow.