-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fix crash at shutdown in runtime metrics #5696
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (72ms) : 64, 81
. : milestone, 72,
master - mean (74ms) : 65, 82
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (1,003ms) : 986, 1020
. : milestone, 1003,
master - mean (1,009ms) : 984, 1033
. : milestone, 1009,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (109ms) : 107, 111
. : milestone, 109,
master - mean (110ms) : 106, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (715ms) : 693, 736
. : milestone, 715,
master - mean (720ms) : 697, 742
. : milestone, 720,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (93ms) : 89, 96
. : milestone, 93,
master - mean (93ms) : 89, 96
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (674ms) : 652, 695
. : milestone, 674,
master - mean (674ms) : 645, 702
. : milestone, 674,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (191ms) : 188, 194
. : milestone, 191,
master - mean (191ms) : 188, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (1,104ms) : 1083, 1125
. : milestone, 1104,
master - mean (1,107ms) : 1087, 1127
. : milestone, 1107,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (277ms) : 271, 283
. : milestone, 277,
master - mean (277ms) : 273, 282
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (901ms) : 878, 924
. : milestone, 901,
master - mean (902ms) : 879, 925
. : milestone, 902,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5696) - mean (265ms) : 261, 270
. : milestone, 265,
master - mean (266ms) : 261, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (5696) - mean (883ms) : 856, 909
. : milestone, 883,
master - mean (881ms) : 859, 903
. : milestone, 881,
|
Datadog ReportBranch report: ✅ 0 Failed, 24255 Passed, 66 Skipped, 44m 32.33s Total Time |
Benchmarks Report for tracer 🐌Benchmarks for #5696 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
Throughput/Crank Report:zap:Throughput results for AspNetCoreSimpleController comparing the following branches/commits: Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red. Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5696) (11.481M) : 0, 11481051
master (11.569M) : 0, 11568891
benchmarks/2.9.0 (11.449M) : 0, 11448607
section Automatic
This PR (5696) (7.732M) : 0, 7731714
master (7.767M) : 0, 7767254
benchmarks/2.9.0 (8.083M) : 0, 8082807
section Trace stats
master (8.118M) : 0, 8117530
section Manual
This PR (5696) (9.929M) : 0, 9929269
master (10.019M) : 0, 10019017
section Manual + Automatic
This PR (5696) (7.297M) : 0, 7296546
master (7.281M) : 0, 7281374
section Version Conflict
master (6.636M) : 0, 6636457
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5696) (9.701M) : 0, 9700696
master (9.453M) : 0, 9453044
benchmarks/2.9.0 (9.581M) : 0, 9580805
section Automatic
This PR (5696) (6.655M) : 0, 6655388
master (6.502M) : 0, 6502006
section Trace stats
master (6.976M) : 0, 6976118
section Manual
This PR (5696) (8.027M) : 0, 8027254
master (8.257M) : 0, 8256510
section Manual + Automatic
This PR (5696) (6.050M) : 0, 6049872
master (6.094M) : 0, 6093563
section Version Conflict
master (5.682M) : 0, 5681946
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5696) (9.989M) : 0, 9988727
master (10.169M) : 0, 10168829
benchmarks/2.9.0 (10.102M) : 0, 10101741
section Automatic
This PR (5696) (7.068M) : 0, 7067735
master (7.240M) : 0, 7240499
benchmarks/2.9.0 (7.401M) : 0, 7400836
section Trace stats
master (7.595M) : 0, 7594699
section Manual
This PR (5696) (8.781M) : 0, 8781044
master (9.108M) : 0, 9107531
section Manual + Automatic
This PR (5696) (6.747M) : 0, 6746539
master (7.001M) : 0, 7000903
section Version Conflict
master (6.374M) : 0, 6373775
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of changes
Don't dispose the runtime metrics when shutting down.
Reason for change
Disposing the underlying EventListener can cause a crash if the customer has another EventListener running: dotnet/runtime#103480
Implementation details
Removed the explicit
Dispose
call inTraceManager.RunShutdownTasksAsync
Test coverage
Added a smoke test. Confirmed that it crashes without the fix.