Skip to content

EventCounters unexpectedly stop reporting data when first of two listeners disconnects #61353

@noahfalk

Description

@noahfalk

Description

One our internal partner teams at Microsoft reported that if they start an EventListener for EventCounters, then separately start PerfView to listen to counters, then stop the PerfView session the counter information stops flowing to their EventListener. Given that the EventListener never stopped listening they expected the counter events to continue.

Reproduction Steps

Start EventListener for EventCounters, then start + stop a PerfView ETW based session for the same counter events.

Expected behavior

Counter events continue to be posted to EventListener

Actual behavior

Counter events stop being posted

Regression?

Unknown, but probably not

Known Workarounds

No response

Configuration

I think this is .NET Core 6 (preview builds), amd64, but the issue probably occurs regardless of version/architecture

Other information

The code for CounterGroup appears to stop sending upon receiving a Disable command from any listener, regardless of the presence of other listeners. https://github.com/dotnet/runtime/blob/v5.0.11/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs#L67

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions