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

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

Closed
noahfalk opened this issue Nov 9, 2021 · 2 comments · Fixed by #82970
Closed
Assignees
Milestone

Comments

@noahfalk
Copy link
Member

noahfalk commented Nov 9, 2021

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

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Tracing-coreclr untriaged New issue has not been triaged by the area owner labels Nov 9, 2021
@tommcdon tommcdon added this to the 7.0.0 milestone Nov 9, 2021
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Nov 9, 2021
@tommcdon tommcdon added the enhancement Product code improvement that does NOT require public API changes/additions label May 17, 2022
@tommcdon tommcdon modified the milestones: 7.0.0, Future May 17, 2022
@noahfalk noahfalk removed the enhancement Product code improvement that does NOT require public API changes/additions label May 21, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 26, 2022
@hoyosjs hoyosjs modified the milestones: Future, 7.0.0 Jul 27, 2022
@tommcdon tommcdon modified the milestones: 7.0.0, 8.0.0 Aug 8, 2022
@dpk83
Copy link

dpk83 commented Aug 16, 2022

@noahfalk Is this issue only impacting .NET 6 or earlier versions as well? Is the fix going to be backported to all affected versions?

@davmason
Copy link
Member

@dpk83 this issue affects all runtimes that have support for dotnet-counters. A fix has not been checked in yet for this issue, when it is we will not backport it unless there is a business justification for it - i.e. a customer is blocked on it.

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 4, 2022
@tommcdon tommcdon added the in-pr There is an active PR which will close this issue when it is merged label Feb 28, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 8, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.