-
Notifications
You must be signed in to change notification settings - Fork 141
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
[ASM] Extend locking to cover _disposed member variable #6319
base: master
Are you sure you want to change the base?
[ASM] Extend locking to cover _disposed member variable #6319
Conversation
Datadog ReportBranch report: ❌ 6 Failed (0 Known Flaky), 444522 Passed, 2630 Skipped, 19h 22m 18.87s Total Time ❌ Failed Tests (6)
|
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 (6319) - mean (72ms) : 64, 80
. : milestone, 72,
master - mean (72ms) : 64, 80
. : milestone, 72,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (1,109ms) : 1086, 1132
. : milestone, 1109,
master - mean (1,107ms) : 1085, 1128
. : milestone, 1107,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6319) - mean (109ms) : 106, 112
. : milestone, 109,
master - mean (108ms) : 106, 110
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (772ms) : 757, 787
. : milestone, 772,
master - mean (771ms) : 757, 785
. : milestone, 771,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6319) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 93
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (726ms) : 710, 743
. : milestone, 726,
master - mean (726ms) : 707, 745
. : milestone, 726,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6319) - mean (191ms) : 187, 195
. : milestone, 191,
master - mean (191ms) : 186, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (1,212ms) : 1190, 1233
. : milestone, 1212,
master - mean (1,213ms) : 1190, 1236
. : milestone, 1213,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6319) - mean (276ms) : 271, 282
. : milestone, 276,
master - mean (276ms) : 271, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (944ms) : 927, 960
. : milestone, 944,
master - mean (948ms) : 929, 967
. : milestone, 948,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6319) - mean (266ms) : 262, 271
. : milestone, 266,
master - mean (265ms) : 261, 270
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6319) - mean (931ms) : 911, 952
. : milestone, 931,
master - mean (931ms) : 913, 950
. : milestone, 931,
|
Throughput/Crank Report ⚡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 (6319) (11.102M) : 0, 11102160
master (10.953M) : 0, 10953423
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6319) (7.162M) : 0, 7162083
master (7.258M) : 0, 7258128
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.591M) : 0, 7590970
section Manual
master (11.208M) : 0, 11207771
section Manual + Automatic
This PR (6319) (6.757M) : 0, 6756714
master (6.722M) : 0, 6721955
section DD_TRACE_ENABLED=0
master (10.178M) : 0, 10178373
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6319) (9.556M) : 0, 9555890
master (9.269M) : 0, 9268938
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6319) (6.270M) : 0, 6269653
master (6.299M) : 0, 6299432
section Trace stats
master (6.605M) : 0, 6605300
section Manual
master (9.212M) : 0, 9211628
section Manual + Automatic
This PR (6319) (5.854M) : 0, 5853538
master (5.797M) : 0, 5796944
section DD_TRACE_ENABLED=0
master (8.676M) : 0, 8675777
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6319) (9.006M) : 0, 9006075
master (9.183M) : 0, 9182720
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6319) (6.022M) : 0, 6021798
master (6.143M) : 0, 6143036
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (6.605M) : 0, 6604886
section Manual
master (9.047M) : 0, 9046916
section Manual + Automatic
This PR (6319) (5.709M) : 0, 5709206
master (5.730M) : 0, 5730049
section DD_TRACE_ENABLED=0
master (8.828M) : 0, 8828238
|
Benchmarks Report for tracer 🐌Benchmarks for #6319 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.169 | 1,134.02 | 1,326.01 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.13μs | 0.736ns | 2.75ns | 0.0136 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.59μs | 0.774ns | 3ns | 0.0128 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.51μs | 2.8ns | 10.8ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.27μs | 0.629ns | 2.35ns | 0.0134 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 0.86ns | 3.33ns | 0.0139 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.6μs | 2.22ns | 8.61ns | 0.167 | 0 | 0 | 1.05 KB |
#6319 | CallElasticsearch |
net6.0 | 1.33μs | 0.402ns | 1.56ns | 0.0133 | 0 | 0 | 976 B |
#6319 | CallElasticsearch |
netcoreapp3.1 | 1.56μs | 2.29ns | 8.87ns | 0.0131 | 0 | 0 | 976 B |
#6319 | CallElasticsearch |
net472 | 2.6μs | 2.78ns | 10.8ns | 0.157 | 0 | 0 | 995 B |
#6319 | CallElasticsearchAsync |
net6.0 | 1.32μs | 0.575ns | 2.23ns | 0.0133 | 0 | 0 | 952 B |
#6319 | CallElasticsearchAsync |
netcoreapp3.1 | 1.66μs | 0.48ns | 1.73ns | 0.0133 | 0 | 0 | 1.02 KB |
#6319 | CallElasticsearchAsync |
net472 | 2.62μs | 1.12ns | 4.33ns | 0.167 | 0 | 0 | 1.05 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.23μs | 0.961ns | 3.72ns | 0.0134 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 1.06ns | 4.11ns | 0.0133 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.82μs | 1.88ns | 7.27ns | 0.145 | 0 | 0 | 915 B |
#6319 | ExecuteAsync |
net6.0 | 1.22μs | 0.614ns | 2.3ns | 0.0135 | 0 | 0 | 952 B |
#6319 | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 0.749ns | 2.8ns | 0.0126 | 0 | 0 | 952 B |
#6319 | ExecuteAsync |
net472 | 1.8μs | 0.781ns | 3.03ns | 0.145 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 4.47μs | 2.75ns | 10.3ns | 0.0317 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.32μs | 2.88ns | 11.1ns | 0.0373 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.25μs | 3.7ns | 14.3ns | 0.495 | 0 | 0 | 3.12 KB |
#6319 | SendAsync |
net6.0 | 4.37μs | 1.89ns | 7.06ns | 0.0329 | 0 | 0 | 2.31 KB |
#6319 | SendAsync |
netcoreapp3.1 | 5.27μs | 1.8ns | 6.96ns | 0.0369 | 0 | 0 | 2.85 KB |
#6319 | SendAsync |
net472 | 7.38μs | 1.88ns | 7.03ns | 0.494 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.57μs | 0.661ns | 2.47ns | 0.0227 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.17μs | 1.4ns | 5.04ns | 0.0218 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.62μs | 1.51ns | 5.86ns | 0.249 | 0 | 0 | 1.57 KB |
#6319 | EnrichedLog |
net6.0 | 1.64μs | 1.25ns | 4.85ns | 0.0229 | 0 | 0 | 1.64 KB |
#6319 | EnrichedLog |
netcoreapp3.1 | 2.28μs | 0.985ns | 3.41ns | 0.0217 | 0 | 0 | 1.64 KB |
#6319 | EnrichedLog |
net472 | 2.6μs | 1.06ns | 3.81ns | 0.249 | 0 | 0 | 1.57 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 119μs | 266ns | 1.03μs | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 124μs | 281ns | 1.09μs | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 151μs | 100ns | 387ns | 0.676 | 0.225 | 0 | 4.46 KB |
#6319 | EnrichedLog |
net6.0 | 120μs | 216ns | 837ns | 0 | 0 | 0 | 4.28 KB |
#6319 | EnrichedLog |
netcoreapp3.1 | 124μs | 129ns | 466ns | 0 | 0 | 0 | 4.28 KB |
#6319 | EnrichedLog |
net472 | 152μs | 208ns | 807ns | 0.685 | 0.228 | 0 | 4.46 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 3.17μs | 1.81ns | 6.99ns | 0.0297 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.35μs | 1.45ns | 5.62ns | 0.0283 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.83μs | 1.52ns | 5.9ns | 0.319 | 0 | 0 | 2.02 KB |
#6319 | EnrichedLog |
net6.0 | 3.17μs | 0.753ns | 2.71ns | 0.03 | 0 | 0 | 2.2 KB |
#6319 | EnrichedLog |
netcoreapp3.1 | 4.2μs | 3.07ns | 11.1ns | 0.0297 | 0 | 0 | 2.2 KB |
#6319 | EnrichedLog |
net472 | 4.92μs | 1.13ns | 4.39ns | 0.319 | 0 | 0 | 2.02 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.31μs | 0.65ns | 2.43ns | 0.0157 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.79μs | 0.661ns | 2.47ns | 0.0151 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.04μs | 1.01ns | 3.79ns | 0.183 | 0 | 0 | 1.16 KB |
#6319 | SendReceive |
net6.0 | 1.4μs | 0.861ns | 3.22ns | 0.016 | 0 | 0 | 1.14 KB |
#6319 | SendReceive |
netcoreapp3.1 | 1.77μs | 0.882ns | 3.42ns | 0.0151 | 0 | 0 | 1.14 KB |
#6319 | SendReceive |
net472 | 2.1μs | 0.868ns | 3.36ns | 0.183 | 0 | 0 | 1.16 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.76μs | 1.2ns | 4.64ns | 0.022 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.99μs | 3.27ns | 12.7ns | 0.0218 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.37μs | 2.59ns | 10ns | 0.322 | 0 | 0 | 2.04 KB |
#6319 | EnrichedLog |
net6.0 | 2.75μs | 0.857ns | 3.32ns | 0.022 | 0 | 0 | 1.6 KB |
#6319 | EnrichedLog |
netcoreapp3.1 | 4.06μs | 1ns | 3.76ns | 0.0203 | 0 | 0 | 1.65 KB |
#6319 | EnrichedLog |
net472 | 4.3μs | 2.36ns | 9.15ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6319
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.168
653.83
763.50
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.132
405.10
458.61
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.168 | 653.83 | 763.50 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.132 | 405.10 | 458.61 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 405ns | 0.665ns | 2.57ns | 0.00806 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 566ns | 0.73ns | 2.83ns | 0.00792 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 672ns | 0.909ns | 3.52ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 493ns | 0.611ns | 2.37ns | 0.00982 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 654ns | 1.08ns | 4.2ns | 0.00954 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 913ns | 0.51ns | 1.98ns | 0.104 | 0 | 0 | 658 B |
#6319 | StartFinishSpan |
net6.0 | 458ns | 0.745ns | 2.89ns | 0.00803 | 0 | 0 | 576 B |
#6319 | StartFinishSpan |
netcoreapp3.1 | 611ns | 1.3ns | 5.05ns | 0.0079 | 0 | 0 | 576 B |
#6319 | StartFinishSpan |
net472 | 631ns | 1.6ns | 6.19ns | 0.0918 | 0 | 0 | 578 B |
#6319 | StartFinishScope |
net6.0 | 496ns | 0.794ns | 2.97ns | 0.00974 | 0 | 0 | 696 B |
#6319 | StartFinishScope |
netcoreapp3.1 | 764ns | 1.05ns | 4.08ns | 0.00917 | 0 | 0 | 696 B |
#6319 | StartFinishScope |
net472 | 867ns | 2.03ns | 7.84ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 591ns | 0.63ns | 2.44ns | 0.0096 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 947ns | 1.12ns | 4.34ns | 0.00945 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.16μs | 2.46ns | 9.54ns | 0.104 | 0 | 0 | 658 B |
#6319 | RunOnMethodBegin |
net6.0 | 602ns | 0.906ns | 3.51ns | 0.00985 | 0 | 0 | 696 B |
#6319 | RunOnMethodBegin |
netcoreapp3.1 | 866ns | 4.39ns | 20.1ns | 0.00917 | 0 | 0 | 696 B |
#6319 | RunOnMethodBegin |
net472 | 1.16μs | 1.4ns | 5.42ns | 0.104 | 0 | 0 | 658 B |
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.
Nice
Summary of changes
We have seen that some clients experience crashes that seem to be caused to concurrent access to members within the WAF. As the WAF does not implemented any locking, it's client code of the WAF that should ensure there's no incorrect concurrent access to the WAF.
Test coverage
Added a unit test that tests concurrent access to the context and fails before this changes is implemented.