Skip to content

Handle dotnet/runtime#127957 in integration tests#8665

Merged
NachoEchevarria merged 13 commits into
masterfrom
nacho/SkipTypeLoadExceptionError
Jun 2, 2026
Merged

Handle dotnet/runtime#127957 in integration tests#8665
NachoEchevarria merged 13 commits into
masterfrom
nacho/SkipTypeLoadExceptionError

Conversation

@NachoEchevarria

@NachoEchevarria NachoEchevarria commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Retry sample launches that crash with the dotnet/runtime#127957 fingerprint (a race in MDInternalRW between unlocked metadata readers and the profiler emitting tokens). Up to 2 retries; if the fingerprint persists across all 3 attempts, throw a clear exception to fail the test — at that point it's not a flake.

Reason for change

Integration tests intermittently crash during runtime startup with one of three platform-specific shapes — all documented manifestations of the issue:

  • Linux/SIGABRT: TypeLoadException: [Undefined resource string ID:0x...] from PortableThreadPool.GateThread
  • Linux/SIGABRT: MissingMethodException: Method not found: 'Boolean ConcurrentDictionary'2.TryGetValue(...)' during HostBuilder.Build()
  • Windows: Fatal error. Internal CLR error. (0x80131506) (COR_E_EXECUTIONENGINE FailFast) on PortableThreadPool.GateThread. The Windows variant is more annoying — the host can report exit code 0 even though the runtime died, and the sample can emit partial output before dying, so downstream test assertions fail with misleading messages.

All three fingerprints are structurally unique to corrupted-metadata throws — unreachable through normal product or user code.

Implementation details

  • ErrorHelpers.HandleRuntimeSkippableErrorsAsync — central decision helper. Returns true to retry, false to proceed normally, throws when the fingerprint persists past the retry budget (exit code can't be trusted to surface the failure on Windows). Wired into the three "run sample" entry points: TestHelper.RunSampleAndWaitForExit, TestHelper.RunDotnetTestSampleAndWaitForExit (CI Visibility / VSTest path), and AspNetCoreTestFixture.TryStartApp.
  • Two metrics tagged with runtime_issue:127957:
    • dd_trace_dotnet.ci.tests.retried_due_to_runtime_metadata_race (recovered via retry)
    • dd_trace_dotnet.ci.tests.persistent_runtime_metadata_race (failed after all retries)
  • Fixture path retries on either failure point (port-bind timeout and EnsureServerStarted health-check failure) — the Windows manifestation often binds Kestrel before the gate thread dies, so the crash surfaces during health-check rather than at port-bind. Both detection paths share a CheckRaceAndCleanupForRetryAsync helper.
  • Fixture also waits up to 5s for the process to finish exiting before reading the exit code, so a slow createdump doesn't slip past detection.

Test coverage

Existing suite. Retry/fail only fires on the narrow fingerprints, so other failures surface normally.

Other details

Revisit when dotnet/runtime#127957 is fixed upstream (currently open).

@github-actions github-actions Bot added the area:tests unit tests, integration tests label May 20, 2026
@NachoEchevarria NachoEchevarria changed the title skip type load exception Retry + skip integration tests hit by dotnet/runtime#127957 May 20, 2026
@pr-commenter

pr-commenter Bot commented May 20, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-29 15:00:50

Comparing candidate commit 0abfb46 in PR branch nacho/SkipTypeLoadExceptionError with baseline commit 5b90434 in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472

Found 8 performance improvements and 11 performance regressions! Performance is the same for 44 metrics, 9 unstable metrics, 90 known flaky benchmarks, 36 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartActiveSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟥 throughput [-96775.344op/s; -92099.448op/s] or [-35.080%; -33.385%]
  • 🟩 execution_time [-77.233ms; -76.227ms] or [-38.420%; -37.920%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartActiveSpan netcoreapp3.1

  • 🟩 execution_time [-112.961ms; -110.916ms] or [-56.161%; -55.145%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟥 throughput [-153590.564op/s; -131559.193op/s] or [-53.642%; -45.947%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟥 throughput [-154338.426op/s; -130021.240op/s] or [-55.562%; -46.808%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_GetCurrentSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟥 throughput [-117801.615op/s; -99735.731op/s] or [-42.167%; -35.700%]
  • 🟩 execution_time [-75.380ms; -56.274ms] or [-37.600%; -28.070%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_GetCurrentSpan netcoreapp3.1

  • 🟩 execution_time [-112.037ms; -110.614ms] or [-55.889%; -55.179%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_SetActive net6.0

  • 🟥 throughput [-116877.585op/s; -104661.696op/s] or [-45.270%; -40.538%]
  • 🟩 execution_time [-68.570ms; -58.610ms] or [-34.166%; -29.204%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_SetActive netcoreapp3.1

  • 🟩 execution_time [-112.620ms; -110.048ms] or [-55.829%; -54.554%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 throughput [-68992.234op/s; -61353.798op/s] or [-46.868%; -41.679%]
  • 🟩 execution_time [-43.260ms; -26.669ms] or [-21.467%; -13.234%]

scenario:Benchmarks.Trace.NLogBenchmark.EnrichedLog net6.0

  • 🟥 throughput [-54125.768op/s; -37206.776op/s] or [-27.139%; -18.656%]
  • 🟩 execution_time [-75.173ms; -56.020ms] or [-38.017%; -28.331%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0

  • 🟩 execution_time [-79.601ms; -75.913ms] or [-39.809%; -37.964%]
  • 🟥 throughput [-97235.085op/s; -90032.325op/s] or [-33.696%; -31.200%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1

  • 🟩 execution_time [-107.880ms; -105.073ms] or [-54.068%; -52.661%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • 🟩 execution_time [-64.988ms; -63.529ms] or [-32.381%; -31.655%]
  • 🟥 throughput [-105794.621op/s; -103189.725op/s] or [-40.676%; -39.674%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [-100.727ms; -76.020ms] or [-50.508%; -38.119%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0

  • 🟩 execution_time [-77.070ms; -74.248ms] or [-38.432%; -37.024%]
  • 🟥 throughput [-110488.816op/s; -106439.339op/s] or [-38.195%; -36.795%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • 🟩 execution_time [-107.882ms; -106.235ms] or [-54.081%; -53.255%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • 🟩 execution_time [-32.408ms; -17.409ms] or [-16.102%; -8.650%]
  • 🟥 throughput [-127709.305op/s; -117650.145op/s] or [-54.402%; -50.117%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-97.933ms; -72.526ms] or [-49.014%; -36.298%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-46.450ms; -4.490ms] or [-23.142%; -2.237%]
  • unstable throughput [-153324.067op/s; -122261.595op/s] or [-52.257%; -41.670%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [-101.532ms; -76.215ms] or [-50.911%; -38.216%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-62.964ms; -29.603ms] or [-31.703%; -14.906%]
  • 🟥 throughput [-146269.084op/s; -122821.881op/s] or [-47.840%; -40.171%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • 🟩 execution_time [-109.647ms; -108.016ms] or [-54.926%; -54.109%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • 🟩 execution_time [-66.813ms; -49.862ms] or [-33.279%; -24.836%]
  • 🟥 throughput [-106120.476op/s; -100476.155op/s] or [-38.269%; -36.233%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1

  • 🟩 execution_time [-111.872ms; -110.365ms] or [-55.863%; -55.110%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+8.332%; +8.340%]
  • 🟩 execution_time [-70.617ms; -52.277ms] or [-35.247%; -26.093%]
  • 🟥 throughput [-93284.593op/s; -89444.473op/s] or [-37.290%; -35.755%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [-82.895ms; -52.698ms] or [-41.271%; -26.236%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟩 execution_time [-79.003ms; -76.790ms] or [-39.437%; -38.333%]
  • 🟥 throughput [-94688.848op/s; -93054.521op/s] or [-35.185%; -34.578%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-102.318ms; -76.787ms] or [-51.029%; -38.296%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+5.487%; +5.496%]
  • unstable execution_time [-74.691ms; -53.555ms] or [-37.175%; -26.655%]
  • 🟥 throughput [-73264.496op/s; -56263.371op/s] or [-41.761%; -32.070%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1

  • 🟩 execution_time [-115.191ms; -113.146ms] or [-57.270%; -56.253%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+7.434%; +7.442%]
  • 🟩 execution_time [-61.732ms; -59.098ms] or [-30.694%; -29.384%]
  • 🟥 throughput [-94369.191op/s; -91463.301op/s] or [-42.753%; -41.436%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • 🟩 execution_time [-108.223ms; -106.562ms] or [-54.194%; -53.362%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+9.570%; +9.578%]
  • unstable execution_time [-47.611ms; -15.712ms] or [-23.700%; -7.821%]
  • 🟥 throughput [-126581.060op/s; -107469.381op/s] or [-49.052%; -41.646%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [-101.750ms; -76.535ms] or [-50.607%; -38.066%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]
  • 🟩 execution_time [-55.263ms; -35.357ms] or [-27.657%; -17.695%]
  • 🟥 throughput [-145714.851op/s; -128821.640op/s] or [-50.723%; -44.842%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-103.019ms; -78.176ms] or [-51.187%; -38.843%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-7157.339op/s; -6424.605op/s] or [-8.486%; -7.618%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • unstable execution_time [-69.367ms; -31.747ms] or [-34.607%; -15.839%]
  • unstable throughput [-41623.678op/s; -24114.102op/s] or [-34.986%; -20.269%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟩 execution_time [-98.446ms; -92.500ms] or [-49.515%; -46.524%]
  • 🟥 throughput [-8963.632op/s; -4965.688op/s] or [-9.114%; -5.049%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+315.503ms; +331.178ms] or [+156.564%; +164.342%]
  • 🟥 throughput [-55.138op/s; -42.476op/s] or [-9.920%; -7.642%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+98.227ms; +99.865ms] or [+77.606%; +78.899%]
  • 🟩 throughput [+89.636op/s; +95.714op/s] or [+11.818%; +12.619%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+83.868ms; +85.089ms] or [+74.220%; +75.301%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • 🟩 execution_time [-84.630ms; -80.387ms] or [-39.525%; -37.543%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-50.773ms; -30.005ms] or [-24.178%; -14.288%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-266624.147op/s; -262809.318op/s] or [-27.224%; -26.834%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-96.350ms; -73.115ms] or [-42.968%; -32.606%]
  • unstable throughput [-255364.146op/s; -140885.494op/s] or [-27.281%; -15.051%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-44.813ms; -20.458ms] or [-22.369%; -10.212%]
  • 🟥 throughput [-129623.959op/s; -113349.744op/s] or [-18.624%; -16.286%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • unstable execution_time [-25.890ms; -5.676ms] or [-13.063%; -2.864%]
  • 🟥 throughput [-34765.081op/s; -19340.725op/s] or [-22.120%; -12.306%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 execution_time [-68.732ms; -64.743ms] or [-35.042%; -33.008%]
  • 🟩 throughput [+8845.526op/s; +11527.611op/s] or [+7.047%; +9.183%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • unstable execution_time [-53.480ms; -31.712ms] or [-26.442%; -15.679%]
  • unstable throughput [-373850.185op/s; -31543.504op/s] or [-12.466%; -1.052%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-18.812ms; -14.396ms] or [-8.672%; -6.636%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+301.802ms; +315.773ms] or [+150.800%; +157.781%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • unstable execution_time [+147.452ms; +186.223ms] or [+74.360%; +93.913%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+301.020ms; +308.121ms] or [+151.631%; +155.208%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.327ms; +311.122ms] or [+146.035%; +152.811%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+255.961ms; +274.022ms] or [+125.130%; +133.959%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+287.077ms; +300.990ms] or [+143.481%; +150.434%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟥 allocated_mem [+24.647KB; +24.648KB] or [+541.479%; +541.512%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+21.451µs; +45.182µs] or [+6.848%; +14.424%]
  • 🟥 throughput [-421.387op/s; -221.752op/s] or [-13.136%; -6.913%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.606ms; +300.468ms] or [+149.534%; +149.965%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • unstable execution_time [+357.770ms; +370.892ms] or [+388.732%; +402.990%]
  • 🟥 throughput [-6888.323op/s; -6726.056op/s] or [-56.602%; -55.269%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+251.297ms; +317.448ms] or [+190.808%; +241.035%]
  • 🟥 throughput [-1350.441op/s; -1111.444op/s] or [-13.073%; -10.759%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+294.372ms; +308.863ms] or [+135.350%; +142.012%]
  • 🟥 throughput [-679.633op/s; -662.695op/s] or [-61.581%; -60.047%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [-48.435ms; +85.564ms] or [-20.641%; +36.464%]
  • 🟥 throughput [-716.798op/s; -623.260op/s] or [-47.811%; -41.572%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+344.076ms; +351.502ms] or [+205.797%; +210.239%]
  • 🟥 throughput [-732.238op/s; -698.018op/s] or [-50.985%; -48.602%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-171.015µs; -141.087µs] or [-8.663%; -7.147%]
  • 🟩 throughput [+39.531op/s; +48.349op/s] or [+7.804%; +9.545%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+307.101ms; +319.632ms] or [+154.650%; +160.960%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+239.501ms; +250.536ms] or [+120.014%; +125.544%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+300.458ms; +307.047ms] or [+150.937%; +154.248%]
  • 🟩 throughput [+25272.590op/s; +38063.323op/s] or [+5.324%; +8.018%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+304.791ms; +318.456ms] or [+153.056%; +159.918%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+188.061ms; +199.072ms] or [+92.988%; +98.432%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+305.390ms; +312.894ms] or [+154.785%; +158.588%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+304.440ms; +315.560ms] or [+152.801%; +158.383%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • unstable execution_time [+215.210ms; +284.564ms] or [+107.263%; +141.829%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+302.954ms; +310.744ms] or [+150.717%; +154.592%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • unstable execution_time [-60.975ms; -23.969ms] or [-28.354%; -11.146%]
  • unstable throughput [-153546.634op/s; -101665.919op/s] or [-42.122%; -27.890%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1

  • unstable execution_time [-89.666ms; -66.749ms] or [-44.978%; -33.482%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-26.502KB; -26.480KB] or [-9.667%; -9.659%]
  • unstable execution_time [-77.894µs; -21.996µs] or [-15.395%; -4.347%]
  • unstable throughput [+112.717op/s; +315.984op/s] or [+5.625%; +15.768%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 execution_time [-96.048µs; -39.333µs] or [-16.644%; -6.816%]
  • 🟩 throughput [+145.940op/s; +302.184op/s] or [+8.338%; +17.264%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+2.572µs; +7.179µs] or [+6.078%; +16.969%]
  • 🟥 throughput [-3308.336op/s; -1366.929op/s] or [-13.927%; -5.754%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-13.577µs; -4.217µs] or [-21.064%; -6.543%]
  • unstable throughput [+1289.601op/s; +3277.472op/s] or [+7.912%; +20.108%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+304.576ms; +318.752ms] or [+153.949%; +161.115%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.157ms; +308.827ms] or [+153.797%; +157.192%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+301.318ms; +306.001ms] or [+150.847%; +153.191%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • unstable execution_time [-81.049ms; -49.660ms] or [-40.512%; -24.823%]
  • unstable throughput [-142024.983op/s; -58973.336op/s] or [-26.882%; -11.162%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.163ms; +314.068ms] or [+150.103%; +156.535%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+305.803ms; +311.876ms] or [+153.560%; +156.609%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+305.844ms; +311.802ms] or [+155.104%; +158.126%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.035ms; +300.772ms] or [+149.659%; +150.027%]
  • 🟩 throughput [+59993160.413op/s; +60277097.579op/s] or [+43.691%; +43.898%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • unstable execution_time [+375.643ms; +394.124ms] or [+467.179%; +490.164%]
  • 🟥 throughput [-7527.542op/s; -7268.117op/s] or [-58.192%; -56.186%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+302.757ms; +305.515ms] or [+151.008%; +152.384%]
  • 🟥 throughput [-30597652.923op/s; -29275759.797op/s] or [-13.553%; -12.967%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • unstable execution_time [-75.842ms; -50.173ms] or [-37.146%; -24.574%]
  • unstable throughput [-225824.915op/s; -76516.931op/s] or [-21.085%; -7.144%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 execution_time [-97.553ms; -93.430ms] or [-49.362%; -47.276%]
  • 🟩 throughput [+49811.572op/s; +69999.605op/s] or [+5.766%; +8.102%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • unstable execution_time [-34.146ms; +1.435ms] or [-17.790%; +0.748%]
  • unstable throughput [-327257.326op/s; -121821.457op/s] or [-25.330%; -9.429%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 execution_time [-101.031ms; -98.922ms] or [-49.638%; -48.602%]
  • 🟩 throughput [+95889.600op/s; +107948.160op/s] or [+9.523%; +10.721%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • unstable execution_time [-55.830ms; -29.825ms] or [-27.881%; -14.894%]
  • unstable throughput [-112104.945op/s; -39516.018op/s] or [-20.356%; -7.175%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • unstable execution_time [-70.490ms; -44.522ms] or [-35.417%; -22.370%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • unstable execution_time [-56.702ms; -26.534ms] or [-28.361%; -13.272%]
  • unstable throughput [-211310.361op/s; -67239.946op/s] or [-23.609%; -7.512%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • unstable execution_time [-72.328ms; -43.836ms] or [-36.734%; -22.263%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 20, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-dotnet | check-big-regressions   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). Execution of Regression Check failed with exit code 5.

DataDog/apm-reliability/dd-trace-dotnet | build   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. Docker failed to register layer due to insufficient disk space.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0abfb46 | Docs | Datadog PR Page | Give us feedback!

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 21, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8665) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.38 ± (74.44 - 75.02) ms72.94 ± (72.95 - 73.30) ms-1.9%
.NET Framework 4.8 - Bailout
duration77.06 ± (77.09 - 77.43) ms77.30 ± (77.22 - 77.57) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1106.80 ± (1106.83 - 1115.51) ms1108.63 ± (1106.16 - 1113.05) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.52 ± (22.47 - 22.57) ms22.45 ± (22.41 - 22.50) ms-0.3%
process.time_to_main_ms85.07 ± (84.85 - 85.29) ms84.58 ± (84.40 - 84.76) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.93 ± (10.93 - 10.94) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.44 ± (22.40 - 22.49) ms22.72 ± (22.67 - 22.78) ms+1.3%✅⬆️
process.time_to_main_ms86.45 ± (86.22 - 86.67) ms88.65 ± (88.37 - 88.93) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.96) MB10.97 ± (10.97 - 10.97) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms215.89 ± (215.00 - 216.78) ms212.10 ± (211.13 - 213.07) ms-1.8%
process.time_to_main_ms546.01 ± (544.73 - 547.30) ms542.33 ± (540.76 - 543.91) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.69 ± (48.67 - 48.72) MB48.57 ± (48.52 - 48.61) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.4%
.NET 6 - Baseline
process.internal_duration_ms21.28 ± (21.22 - 21.33) ms21.27 ± (21.23 - 21.31) ms-0.0%
process.time_to_main_ms74.10 ± (73.91 - 74.30) ms73.87 ± (73.71 - 74.04) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.63) MB10.64 ± (10.63 - 10.64) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.14 ± (21.10 - 21.19) ms21.57 ± (21.51 - 21.62) ms+2.0%✅⬆️
process.time_to_main_ms75.35 ± (75.15 - 75.54) ms77.53 ± (77.26 - 77.80) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.75 ± (10.74 - 10.75) MB10.76 ± (10.75 - 10.76) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms370.08 ± (367.88 - 372.29) ms371.54 ± (369.34 - 373.74) ms+0.4%✅⬆️
process.time_to_main_ms552.33 ± (551.05 - 553.61) ms551.81 ± (550.60 - 553.02) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.15 ± (50.13 - 50.17) MB50.11 ± (50.09 - 50.14) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.85 ± (19.80 - 19.91) ms19.40 ± (19.37 - 19.43) ms-2.3%
process.time_to_main_ms75.88 ± (75.66 - 76.11) ms72.43 ± (72.27 - 72.60) ms-4.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.68) MB7.67 ± (7.67 - 7.68) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.44 ± (19.40 - 19.48) ms19.45 ± (19.41 - 19.49) ms+0.0%✅⬆️
process.time_to_main_ms74.15 ± (73.98 - 74.33) ms73.81 ± (73.65 - 73.97) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.73 ± (7.72 - 7.74) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms297.62 ± (295.42 - 299.83) ms297.94 ± (295.78 - 300.10) ms+0.1%✅⬆️
process.time_to_main_ms499.85 ± (498.74 - 500.97) ms497.91 ± (496.72 - 499.11) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.05 ± (37.02 - 37.08) MB36.99 ± (36.96 - 37.02) MB-0.2%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.1%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration199.43 ± (199.00 - 199.88) ms197.68 ± (197.46 - 198.44) ms-0.9%
.NET Framework 4.8 - Bailout
duration201.85 ± (201.72 - 202.71) ms202.14 ± (201.82 - 202.73) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1199.36 ± (1199.22 - 1205.19) ms1195.88 ± (1196.37 - 1202.47) ms-0.3%
.NET Core 3.1 - Baseline
process.internal_duration_ms193.73 ± (193.26 - 194.20) ms193.93 ± (193.43 - 194.42) ms+0.1%✅⬆️
process.time_to_main_ms84.17 ± (83.87 - 84.47) ms84.58 ± (84.31 - 84.84) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.13 ± (16.10 - 16.16) MB16.05 ± (16.02 - 16.07) MB-0.5%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.5%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms193.80 ± (193.40 - 194.20) ms194.20 ± (193.83 - 194.56) ms+0.2%✅⬆️
process.time_to_main_ms85.60 ± (85.38 - 85.82) ms86.13 ± (85.92 - 86.35) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.09 - 16.14) MB16.10 ± (16.08 - 16.12) MB-0.1%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms386.87 ± (385.56 - 388.17) ms389.14 ± (387.76 - 390.52) ms+0.6%✅⬆️
process.time_to_main_ms539.97 ± (538.60 - 541.35) ms537.34 ± (536.24 - 538.44) ms-0.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.82 ± (57.59 - 58.06) MB57.92 ± (57.69 - 58.14) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms196.93 ± (196.41 - 197.45) ms197.78 ± (197.36 - 198.21) ms+0.4%✅⬆️
process.time_to_main_ms71.93 ± (71.66 - 72.21) ms72.86 ± (72.64 - 73.09) ms+1.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.40 ± (16.37 - 16.43) MB16.33 ± (16.31 - 16.36) MB-0.4%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.2%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms196.57 ± (196.08 - 197.06) ms195.62 ± (195.25 - 195.98) ms-0.5%
process.time_to_main_ms73.04 ± (72.81 - 73.27) ms72.99 ± (72.80 - 73.18) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.40 ± (16.37 - 16.43) MB16.46 ± (16.44 - 16.49) MB+0.4%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.6%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms584.73 ± (582.11 - 587.35) ms583.48 ± (581.37 - 585.59) ms-0.2%
process.time_to_main_ms542.24 ± (541.19 - 543.29) ms545.16 ± (544.06 - 546.26) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.13 ± (61.05 - 61.21) MB61.13 ± (61.05 - 61.20) MB-0.0%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.5%
.NET 8 - Baseline
process.internal_duration_ms195.21 ± (194.81 - 195.62) ms195.08 ± (194.66 - 195.50) ms-0.1%
process.time_to_main_ms72.01 ± (71.78 - 72.25) ms71.88 ± (71.64 - 72.12) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.79) MB11.74 ± (11.71 - 11.76) MB-0.2%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.3%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms194.94 ± (194.54 - 195.34) ms194.82 ± (194.40 - 195.24) ms-0.1%
process.time_to_main_ms72.87 ± (72.67 - 73.07) ms73.13 ± (72.94 - 73.32) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.81) MB11.76 ± (11.74 - 11.79) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.1%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms514.34 ± (511.71 - 516.96) ms514.83 ± (512.37 - 517.29) ms+0.1%✅⬆️
process.time_to_main_ms495.16 ± (494.27 - 496.05) ms494.03 ± (493.16 - 494.90) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.79 ± (50.75 - 50.83) MB50.62 ± (50.59 - 50.66) MB-0.3%
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.2%✅⬆️
Comparison explanation

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 highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8665) - mean (73ms)  : 71, 76
    master - mean (75ms)  : 70, 79

    section Bailout
    This PR (8665) - mean (77ms)  : 75, 80
    master - mean (77ms)  : 75, 79

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (1,110ms)  : 1060, 1159
    master - mean (1,111ms)  : 1045, 1177

Loading
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 (8665) - mean (114ms)  : 110, 118
    master - mean (115ms)  : 109, 120

    section Bailout
    This PR (8665) - mean (119ms)  : 114, 124
    master - mean (116ms)  : 113, 119

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (794ms)  : 776, 812
    master - mean (799ms)  : 766, 832

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8665) - mean (102ms)  : 98, 105
    master - mean (102ms)  : 98, 106

    section Bailout
    This PR (8665) - mean (106ms)  : 101, 111
    master - mean (103ms)  : 100, 107

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (960ms)  : 925, 995
    master - mean (955ms)  : 919, 991

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8665) - mean (99ms)  : 96, 103
    master - mean (104ms)  : 99, 108

    section Bailout
    This PR (8665) - mean (101ms)  : 99, 103
    master - mean (101ms)  : 98, 105

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (828ms)  : 793, 863
    master - mean (827ms)  : 792, 862

Loading
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 (8665) - mean (198ms)  : 192, 204
    master - mean (199ms)  : 195, 204

    section Bailout
    This PR (8665) - mean (202ms)  : 198, 206
    master - mean (202ms)  : 197, 207

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (1,199ms)  : 1155, 1244
    master - mean (1,202ms)  : 1159, 1246

Loading
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 (8665) - mean (287ms)  : 280, 294
    master - mean (287ms)  : 280, 294

    section Bailout
    This PR (8665) - mean (289ms)  : 283, 295
    master - mean (288ms)  : 282, 294

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (968ms)  : 950, 985
    master - mean (966ms)  : 950, 983

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8665) - mean (279ms)  : 274, 284
    master - mean (278ms)  : 270, 285

    section Bailout
    This PR (8665) - mean (277ms)  : 271, 283
    master - mean (278ms)  : 273, 283

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (1,157ms)  : 1127, 1188
    master - mean (1,157ms)  : 1120, 1193

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8665) - mean (277ms)  : 272, 281
    master - mean (277ms)  : 271, 283

    section Bailout
    This PR (8665) - mean (277ms)  : 272, 282
    master - mean (278ms)  : 273, 283

    section CallTarget+Inlining+NGEN
    This PR (8665) - mean (1,040ms)  : 998, 1082
    master - mean (1,041ms)  : 999, 1083

Loading

@NachoEchevarria NachoEchevarria changed the title Retry + skip integration tests hit by dotnet/runtime#127957 Retry + skip integration tests. Runtime#127957 May 21, 2026
@NachoEchevarria NachoEchevarria changed the title Retry + skip integration tests. Runtime#127957 Retry-then-fail for dotnet/runtime#127957 in integration tests May 21, 2026
@NachoEchevarria NachoEchevarria changed the title Retry-then-fail for dotnet/runtime#127957 in integration tests Handle dotnet/runtime#127957 in integration tests May 21, 2026
@NachoEchevarria
NachoEchevarria marked this pull request as ready for review May 22, 2026 08:26
@NachoEchevarria
NachoEchevarria requested a review from a team as a code owner May 22, 2026 08:26

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks! Looks good to me as a generic way to handle these types of unavoidable errors, and we can remove them (or constrain them to only earlier runtimes) in the future once the fix makes it into the runtime 🎉

// Windows — CLR FailFast with HRESULT 0x80131506 (COR_E_EXECUTIONENGINE) on the
// threadpool gate thread. Exit code is unreliable here (we've seen 0 in CI even though
// the runtime died), so we don't gate on it.
if (standardError.Contains("Fatal error. Internal CLR error. (0x80131506)")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, this feels quite broad, but let's see how it goes


public static bool IsRuntime127957Race(int exitCode, string standardError)
{
if (standardError is null)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we preemptively check if we're running against a "known good" value. e.g. this is fixed in .NET 11, and will be in .NET 8.0.x (we don't know the x yet!). Should we bailout of this check if we know that the race shouldn't exist?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that we should do it when the patch is released and out ci have it. Still, we will need this code to handle < net 8 errors

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ASM use this fixture too, or do we need something similar there as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASM relies on this class ultimatelly, so we are covered

@@ -168,54 +168,38 @@ public async Task<Process> StartSample(MockTracerAgent agent, string arguments,

public async Task<ProcessResult> RunSampleAndWaitForExit(MockTracerAgent agent, string arguments = null, string packageVersion = "", string framework = "", int aspNetCorePort = 5000, bool usePublishWithRID = false, string dotnetRuntimeArgs = null)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method called by all of the different "Run sample" methods in here? I think it probably is, but I know CI Visibility uses different methods etc, so not sure if this will catch those too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, we need to cover StartDotnetTestSample for ci vis too, thanks!

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@NachoEchevarria
NachoEchevarria merged commit af0862d into master Jun 2, 2026
68 of 72 checks passed
@NachoEchevarria
NachoEchevarria deleted the nacho/SkipTypeLoadExceptionError branch June 2, 2026 08:24
@github-actions github-actions Bot added this to the vNext-v3 milestone Jun 2, 2026
NachoEchevarria added a commit that referenced this pull request Jul 2, 2026
…nt (#8729)

## Summary of changes

Add a fourth `dotnet/runtime#127957` fingerprint to
`ErrorHelpers.IsRuntime127957Race`:
Linux/SIGABRT (exit 134) + `System.BadImageFormatException` + "The
metadata is corrupt".

## Reason for change

Follow-up to #8665. We hit a new manifestation of the same metadata-race
in CI on
arm64/net9.0 — the test failed with "Unable to determine port
application is listening on"
because the sample aborted at startup:

```
[webserver][stderr] Unhandled exception. System.BadImageFormatException: The metadata is corrupt.
   at ...PhysicalFilesWatcher.GetOrAddFilePathChangeToken(String)
   ...
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Samples.Security.AspNetCore5.Program.Main(String[])
```

Failing build log:

https://dev.azure.com/datadoghq/a51c4863-3eb4-4c5d-878a-58b41a049e4e/_apis/build/builds/202607/logs/6762

## Implementation details

The existing three fingerprints (#8665) surface the race as downstream
`TypeLoadException` /
`MissingMethodException` / Windows FailFast symptoms. This one is the
metadata reader throwing
the corruption directly. Crash-dump analysis confirms the fingerprint:
- `BadImageFormatException`, HRESULT `0x8007000b`
(`COR_E_BADIMAGEFORMAT`)
- Throw originates inside the JIT/metadata reader while compiling
`GetOrAddFilePathChangeToken`
during the first `HostBuilder.Build()` — earliest startup, peak
instrumentation window.
- Datadog native profiler/tracer threads are attached and active in the
process.
- Transient (passes on retry), on a nightly arm64 build — the exact
profile of the issue.

Like the others, "The metadata is corrupt" is unreachable through normal
product/user code, so
the gate stays narrow. The retry/metrics harness and
`AspNetCoreTestFixture.TryStartApp`
`port == null` path are unchanged — only the detection is extended.

## Test coverage

Existing suite. Retry/fail only fires on the narrow fingerprint.

## Other details

Revisit when dotnet/runtime#127957 is fixed upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants