-
Notifications
You must be signed in to change notification settings - Fork 149
[Dynamic Instrumentation] Disable AppDomain related log flooding on .NET Framework #8025
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
Conversation
94c0e49 to
cf6116a
Compare
cf6116a to
1a9ef3a
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8025) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (69ms) : 67, 70
master - mean (68ms) : 67, 70
section Bailout
This PR (8025) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (8025) - mean (1,013ms) : 968, 1057
master - mean (1,008ms) : 966, 1050
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (106ms) : 103, 108
master - mean (106ms) : 104, 108
section Bailout
This PR (8025) - mean (107ms) : 105, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (8025) - mean (741ms) : 671, 812
master - mean (742ms) : 678, 806
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (93ms) : 90, 96
master - mean (94ms) : 92, 96
section Bailout
This PR (8025) - mean (94ms) : 94, 95
master - mean (94ms) : 93, 95
section CallTarget+Inlining+NGEN
This PR (8025) - mean (710ms) : 677, 743
master - mean (708ms) : 658, 759
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (92ms) : 90, 94
master - mean (92ms) : 91, 94
section Bailout
This PR (8025) - mean (93ms) : 92, 94
master - mean (93ms) : 92, 95
section CallTarget+Inlining+NGEN
This PR (8025) - mean (630ms) : 618, 643
master - mean (630ms) : 615, 646
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (195ms) : 190, 200
master - mean (195ms) : 189, 202
section Bailout
This PR (8025) - mean (197ms) : 194, 200
master - mean (199ms) : 194, 203
section CallTarget+Inlining+NGEN
This PR (8025) - mean (1,124ms) : 1055, 1194
master - mean (1,134ms) : 1076, 1191
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (276ms) : 272, 280
master - mean (278ms) : 273, 284
section Bailout
This PR (8025) - mean (278ms) : 273, 283
master - mean (285ms) : 272, 297
section CallTarget+Inlining+NGEN
This PR (8025) - mean (931ms) : 887, 975
master - mean (936ms) : 889, 982
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (270ms) : 267, 273
master - mean (273ms) : 265, 281
section Bailout
This PR (8025) - mean (270ms) : 266, 274
master - mean (275ms) : 268, 282
section CallTarget+Inlining+NGEN
This PR (8025) - mean (928ms) : 891, 965
master - mean (928ms) : 886, 970
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8025) - mean (271ms) : 263, 278
master - mean (271ms) : 266, 276
section Bailout
This PR (8025) - mean (271ms) : 266, 276
master - mean (271ms) : 267, 275
section CallTarget+Inlining+NGEN
This PR (8025) - mean (825ms) : 807, 843
master - mean (828ms) : 802, 854
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-01-07 22:32:10 Comparing candidate commit baf2e93 in PR branch Found 7 performance improvements and 11 performance regressions! Performance is the same for 155 metrics, 13 unstable metrics. scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
|
andrewlock
left a comment
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.
Thanks!
1a9ef3a to
7cf7da8
Compare
7cf7da8 to
eb7775b
Compare
eb7775b to
baf2e93
Compare
Summary of changes
In legacy .NET Framework, a single process can host multiple logically isolated applications ("AppDomains") managed by the runtime. The machine code produced from jitting a method is used among the app domains. Thus, instrumentation is also being shared. The runtime isolates those different domains and prevents data sharing (that is only possible through marshalling/proxying). Each probe has metadata associated with it that is either received through the network (Remote Configuration) or created locally as in Exception Replay. This metadata is kept in memory and is crucial for the instrumentation to function correctly. When a method with an instrumentation is executed in a different domain from the one that kept this metadata, it can't retrieve it, thus bails out with a log message.
If such method executes many times, we may log plenty of time, result in log files rotation and flooding the disk. We have a customer that complaint about it.
As a quick fix for now, I'm disabling those log messages on .NET Framework.
Reason for change
Flooding log files with the log message
BeginMethod_StartMarker: Failed to receive the ProbeData associated with the executing probe <...>Implementation details
Disabling the log message on .NET Framework using a preprocessor directive that prevents the compilation of this log message on .NET Framework builds.