-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Deadlock on EventListeners being enabled/ re-enabled #49804
Comments
dotnet-issue-labeler
bot
added
area-Tracing-coreclr
untriaged
New issue has not been triaged by the area owner
labels
Mar 18, 2021
djluck
added a commit
to djluck/prometheus-net.DotNetRuntime
that referenced
this issue
Mar 28, 2021
## Summary A large refactor that aims to make this library far more stable and performant by default. Event counters are now the default source of metrics while more detailed events can be enabled manually when required (see `CaptureLevel`). ## Changes ### Breaking changes - Dropped support for `prometheus-net` v2. - Dropped support for `netcoreapp2.2` - `WithThreadPoolSchedulingStats` has been removed- it was both a performance hog and incorrect (the IDs of the start/stop events were not stable). May consider adding this in a later release as .NET 5.0 should have fixed the stable IDs issue. - `DotNetRuntimeStatsBuilder.Default()` now only uses event counters to generate metrics. JIT metrics will not be collected (there are no JIT-related event counters in .NET core 3.1). Plan to add support for .NET 5.0 in a later release. You can restore more detailed metrics by using `DotNetRuntimeStatsBuilder.Customize()` and passing a custom `CaptureLevel`. - Renamed `dotnet_gc_collection_reasons_total` -> `dotnet_gc_collection_count_total` ## Additions/ enhancements - Added new threadpool metrics: `dotnet_threadpool_throughput_total`, `dotnet_threadpool_queue_length` and `dotnet_threadpool_timer_count` - Added `dotnet_gc_memory_total_available_bytes` to track the total amount of memory .NET can allocate to (this takes into account docker memory limits) - Added ability to configure the source of majority of collectors- can either be driven solely by event counters (`CaptureLevel.Counters`) or event listeners for more detailed metrics. - Added support for recycling `EventListener`s periodically (`net5.0` only as `netcoreapp3.1` is impacted by dotnet/runtime#49804). - Improved the collection of debugging metrics available - Added documentation around metrics exposed - Added an example `docker-compose` stack that can be used for testing and experimentation ## Fixes - #9 - #10 - #20 - #33 - #35 - #39
djluck
added a commit
to djluck/prometheus-net.DotNetRuntime
that referenced
this issue
Mar 28, 2021
* prometheus-net.DotNetRuntime v4.0.0 ## Summary A large refactor that aims to make this library far more stable and performant by default. Event counters are now the default source of metrics while more detailed events can be enabled manually when required (see `CaptureLevel`). ## Changes ### Breaking changes - Dropped support for `prometheus-net` v2. - Dropped support for `netcoreapp2.2` - `WithThreadPoolSchedulingStats` has been removed- it was both a performance hog and incorrect (the IDs of the start/stop events were not stable). May consider adding this in a later release as .NET 5.0 should have fixed the stable IDs issue. - `DotNetRuntimeStatsBuilder.Default()` now only uses event counters to generate metrics. JIT metrics will not be collected (there are no JIT-related event counters in .NET core 3.1). Plan to add support for .NET 5.0 in a later release. You can restore more detailed metrics by using `DotNetRuntimeStatsBuilder.Customize()` and passing a custom `CaptureLevel`. - Renamed `dotnet_gc_collection_reasons_total` -> `dotnet_gc_collection_count_total` ## Additions/ enhancements - Added new threadpool metrics: `dotnet_threadpool_throughput_total`, `dotnet_threadpool_queue_length` and `dotnet_threadpool_timer_count` - Added `dotnet_gc_memory_total_available_bytes` to track the total amount of memory .NET can allocate to (this takes into account docker memory limits) - Added ability to configure the source of majority of collectors- can either be driven solely by event counters (`CaptureLevel.Counters`) or event listeners for more detailed metrics. - Added support for recycling `EventListener`s periodically (`net5.0` only as `netcoreapp3.1` is impacted by dotnet/runtime#49804). - Improved the collection of debugging metrics available - Added documentation around metrics exposed - Added an example `docker-compose` stack that can be used for testing and experimentation ## Fixes - #9 - #10 - #20 - #33 - #35 - #39 * Adding dedicated `netcoreapp3.1` and `net5.0` test jobs * Fixing test job names * Specifying framework to run tests for * Hopefully this get's things working.. * Excluding mysteriously failing test * Fixing filter flag
It looks like you may be hitting: #53564. |
The fix for what I believe you were hitting went out int he July servicing update of .net3.1 and .net5.0. I'll close this issue for now, but feel free to reopen it if you encounter this again. |
ghost
locked as resolved and limited conversation to collaborators
Aug 26, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When enabling or re-enabling event listeners under high-throughput scenarios, a deadlock can occur which breaks event listener functionality.
This code reliably reproduces the issue in a varying time frame, anywhere from immediately to 5 minutes after running:
I've varied factors including:
None have helped- if the event throughput is for a listener is high enough, then re-enabling events will eventually deadlock.
This is a problem because EventListeners suffer from a bug that causes CPU consumption to rise over time and the recommend work around is to re-enable event listeners.
This issue only affects .net core 3.1. Tested on .net 5.0 without issue.
Configuration
Other information
Stack trace of the deadlock:
The text was updated successfully, but these errors were encountered: