Skip to content

Fix multiple termination signals on .NET 10+#8374

Merged
andrewlock merged 4 commits into
masterfrom
andrew/re-enable-lifetimemanager-tests
Mar 27, 2026
Merged

Fix multiple termination signals on .NET 10+#8374
andrewlock merged 4 commits into
masterfrom
andrew/re-enable-lifetimemanager-tests

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

  • Un-skip TerminationSignalTests
  • Run TerminationSignalTests on more TFMs
  • Fix bug with multiple-termination signals on .NET 10
  • Wait for dogstatsd to finish flushing on exit

Reason for change

As part of the recent runtime metrics work (#8265), we skipped the TerminationSignalTests, as we found they were flaky with the new changes on .NET 10 (and failed outright if we properly await-ed for dogstatsd to flush on exit). Ultimately, this comes down to essentially a race condition in the new termination behaviour on .NET 10.

Previously, we had this for .NET 10:

  • On startup, register for POSIX signals
  • When a posix signal fires, unregister the signals, and start shutdown/flush etc
  • After a small delay (100ms) in the test, send another posix signal
  • As we have already unregistered our handler, the app goes straight to shutdown, and we don't finish flushing.

This doesn't affect <.NET 10, because POSIX is handled by the runtime, and they queue handling of the subsequent signals while the first one is ongoing.

Implementation details

The fix is essentially two changes:

  • Don't un-register the POSIX handlers
  • On subsequent POSIX signals wait for the first handler to complete before exiting

This only affects the .NET 10 path, as the POSIX handlers only fire explicitly on those paths.

As an aside, this allows enabling the statsd flush on shutdown.

Test coverage

I unskipped the currently-skipped test, and expanded the TerminationSignalTests to cover .NET 8+, instead of just .NET 10, so that we know we're actually getting the same behaviour in both cases. (.NET 8 was a somewhat arbitrary choice, we could expand it further if we wanted to, but doesn't necessarily seem worth it to me).

I then tested that in CI and saw it fail, before making the fix.

Other details

There's one "interesting" change of behaviour in terms of Cancel. 🤖 is adamant we Shouldn't cancel the default signal handling on the first handler, because we want the "default signal handling" to kick in after we've run our shutdown hooks. I'm not entirely sure if that's true or not tbh, but it doesn't seem to affect the tests one way or another so I'm guessing, meh? 🤷‍♂️

andrewlock and others added 3 commits March 26, 2026 08:33
- Add DD_LIFETIME_SHUTDOWN_DELAY_MS env var to sample app so shutdown
  hook takes longer than the 100ms interval between signals
- Unskip SigtermTriggersShutdownOnce_WhenRepeated test
- Widen test from NET10_0_OR_GREATER to NET8_0_OR_GREATER
- Add net8.0 and net9.0 TFMs to sample project

The test now reliably fails, confirming the bug: the 2nd SIGTERM kills
the process before shutdown hooks complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three fixes to prevent shutdown hooks from being interrupted by duplicate
termination signals:

1. Don't dispose signal registrations during RunShutdownTasks. They must
   stay alive so duplicate signals arriving mid-shutdown are handled by
   our handler (which cancels them), not by the OS default (which kills).

2. Make RunShutdownTasks wait for in-progress shutdown instead of
   short-circuiting. When ProcessExit fires after the signal handler
   already started shutdown, it now blocks until hooks complete rather
   than returning immediately (which let the runtime tear down early).

3. Rework TerminationSignalHandler: first signal runs shutdown tasks
   synchronously without canceling (so the OS terminates the process
   after hooks complete, giving exit code 143). Subsequent signals cancel
   and wait, keeping the process alive until shutdown finishes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@andrewlock andrewlock requested review from a team as code owners March 26, 2026 08:35
@andrewlock andrewlock added type:bug AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos labels Mar 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d004f02890

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +269 to +270
context.Cancel = true; // Keep the process alive long enough to take the managed shutdown path.
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop swallowing follow-up SIGTERM after shutdown starts

In TerminationSignalHandler, duplicate signals now always set context.Cancel = true, and RunShutdownTasks no longer disposes the signal registrations, so this handler remains active after shutdown completes. If another registered handler cancels the first SIGTERM (for graceful host shutdown), _terminationExitInitiated stays set and every subsequent SIGTERM is canceled by this branch, which prevents expected "second SIGTERM forces termination" behavior and can leave the process only killable via SIGKILL.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That... seems reasonable 😅 I think we can just get rid of the context.Cancel=true entirely 🤔 I don't see a reason we need it tbh.

FWIW, the other AI (which was adamant about the code previously) now agrees with this one 🙄

Yes, that analysis is correct. If another handler (e.g., the ASP.NET host) cancels the first SIGTERM to do its own graceful shutdown, then every subsequent SIGTERM hits the duplicate branch, gets canceled, and the process becomes unkillable except via SIGKILL. That's worse than the original behavior.

Removing context.Cancel entirely from TerminationSignalHandler is the right call. Our handler's job is just to run shutdown hooks — it shouldn't be in the business of deciding whether the process lives or dies. Let the OS default (or other handlers) handle termination semantics.

WDYT @tonyredondo, go with removing it entirely?

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.

as we talked, we don't need to set the Cancel property at all.

@pr-commenter

pr-commenter Bot commented Mar 26, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-26 10:30:00

Comparing candidate commit 51c3ca4 in PR branch andrew/re-enable-lifetimemanager-tests with baseline commit 314f452 in branch master.

Found 7 performance improvements and 8 performance regressions! Performance is the same for 258 metrics, 15 unstable metrics.

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.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟩 execution_time [-92.275ms; -89.928ms] or [-45.785%; -44.621%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 execution_time [-26.617ms; -20.266ms] or [-11.937%; -9.089%]
  • 🟩 throughput [+109.233op/s; +141.963op/s] or [+10.138%; +13.176%]

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

  • 🟥 execution_time [+60.446ms; +61.447ms] or [+51.309%; +52.159%]
  • 🟩 throughput [+68.562op/s; +79.299op/s] or [+5.048%; +5.838%]

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

  • 🟥 throughput [-235.733op/s; -99.897op/s] or [-15.961%; -6.764%]

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

  • 🟥 execution_time [+84.921µs; +88.532µs] or [+6.218%; +6.482%]
  • 🟥 throughput [-44.629op/s; -42.801op/s] or [-6.096%; -5.846%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1

  • 🟥 execution_time [+94.553µs; +105.047µs] or [+5.009%; +5.565%]

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

  • 🟥 throughput [-53921.402op/s; -40933.227op/s] or [-8.726%; -6.624%]

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

  • 🟥 allocated_mem [+58.289KB; +58.322KB] or [+21.263%; +21.275%]

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

  • 🟩 throughput [+15520384.298op/s; +16643364.590op/s] or [+6.886%; +7.384%]

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

  • 🟩 execution_time [-18.001ms; -12.369ms] or [-8.385%; -5.762%]

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

  • 🟥 throughput [-84702.671op/s; -62397.034op/s] or [-8.072%; -5.946%]

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

  • 🟩 execution_time [-14.135ms; -10.711ms] or [-6.632%; -5.025%]

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Mar 26, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8374) 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
duration72.18 ± (72.21 - 72.55) ms72.28 ± (72.40 - 72.79) ms+0.1%✅⬆️
.NET Framework 4.8 - Bailout
duration76.06 ± (75.98 - 76.23) ms77.52 ± (77.27 - 77.63) ms+1.9%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1074.17 ± (1074.02 - 1080.94) ms1076.00 ± (1077.69 - 1084.26) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.27 ± (22.23 - 22.32) ms22.21 ± (22.17 - 22.25) ms-0.3%
process.time_to_main_ms83.84 ± (83.65 - 84.04) ms84.04 ± (83.85 - 84.24) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) MB10.93 ± (10.92 - 10.93) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.20 ± (22.16 - 22.23) ms22.25 ± (22.22 - 22.28) ms+0.2%✅⬆️
process.time_to_main_ms84.99 ± (84.80 - 85.17) ms86.15 ± (85.92 - 86.38) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.95 - 10.95) MB10.96 ± (10.95 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms224.19 ± (223.03 - 225.36) ms224.73 ± (223.61 - 225.86) ms+0.2%✅⬆️
process.time_to_main_ms533.18 ± (532.04 - 534.32) ms536.72 ± (535.52 - 537.93) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.17 ± (48.14 - 48.20) MB48.26 ± (48.23 - 48.29) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.99 ± (20.95 - 21.03) ms21.02 ± (20.98 - 21.06) ms+0.2%✅⬆️
process.time_to_main_ms72.11 ± (71.93 - 72.30) ms72.38 ± (72.22 - 72.53) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.62) MB10.64 ± (10.64 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.87 ± (20.83 - 20.92) ms20.94 ± (20.90 - 20.98) ms+0.3%✅⬆️
process.time_to_main_ms72.72 ± (72.56 - 72.88) ms73.32 ± (73.14 - 73.51) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.68 ± (10.68 - 10.69) MB10.75 ± (10.75 - 10.76) MB+0.7%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms213.74 ± (212.59 - 214.90) ms385.59 ± (383.18 - 388.01) ms+80.4%✅⬆️
process.time_to_main_ms532.98 ± (531.77 - 534.18) ms534.23 ± (533.31 - 535.15) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.07 ± (50.04 - 50.09) MB50.29 ± (50.26 - 50.31) MB+0.4%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)28 ± (28 - 28)-1.4%
.NET 8 - Baseline
process.internal_duration_ms19.30 ± (19.26 - 19.34) ms19.25 ± (19.21 - 19.29) ms-0.3%
process.time_to_main_ms71.83 ± (71.63 - 72.02) ms71.73 ± (71.55 - 71.90) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.68) MB7.68 ± (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.16 ± (19.12 - 19.20) ms19.29 ± (19.26 - 19.33) ms+0.7%✅⬆️
process.time_to_main_ms72.23 ± (72.13 - 72.34) ms72.59 ± (72.44 - 72.75) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.74) MB7.74 ± (7.73 - 7.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms160.92 ± (159.91 - 161.94) ms306.75 ± (304.43 - 309.06) ms+90.6%✅⬆️
process.time_to_main_ms487.92 ± (486.95 - 488.90) ms491.42 ± (490.67 - 492.17) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.85 ± (36.82 - 36.88) MB37.27 ± (37.25 - 37.29) MB+1.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)27 ± (27 - 27)-1.6%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.86 ± (193.81 - 194.68) ms193.53 ± (193.45 - 194.39) ms-0.2%
.NET Framework 4.8 - Bailout
duration197.09 ± (197.00 - 197.47) ms197.35 ± (197.09 - 197.61) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1154.11 ± (1155.88 - 1163.35) ms1162.74 ± (1163.70 - 1171.10) ms+0.7%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.87 ± (187.56 - 188.18) ms188.44 ± (188.15 - 188.73) ms+0.3%✅⬆️
process.time_to_main_ms80.99 ± (80.74 - 81.23) ms80.98 ± (80.80 - 81.16) ms-0.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.06 - 16.12) MB16.07 ± (16.05 - 16.10) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)-0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms187.67 ± (187.29 - 188.06) ms188.73 ± (188.32 - 189.14) ms+0.6%✅⬆️
process.time_to_main_ms82.43 ± (82.24 - 82.63) ms82.36 ± (82.21 - 82.52) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.19) MB16.19 ± (16.17 - 16.22) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms394.51 ± (393.01 - 396.01) ms396.71 ± (395.44 - 397.97) ms+0.6%✅⬆️
process.time_to_main_ms522.77 ± (521.68 - 523.87) ms525.04 ± (524.07 - 526.00) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.67 ± (58.49 - 58.85) MB58.90 ± (58.78 - 59.02) MB+0.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms193.11 ± (192.81 - 193.42) ms192.47 ± (192.05 - 192.90) ms-0.3%
process.time_to_main_ms70.53 ± (70.36 - 70.70) ms70.59 ± (70.41 - 70.77) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.37 ± (16.34 - 16.40) MB16.24 ± (16.12 - 16.37) MB-0.8%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.2%
.NET 6 - Bailout
process.internal_duration_ms192.40 ± (192.03 - 192.78) ms191.31 ± (191.01 - 191.60) ms-0.6%
process.time_to_main_ms71.36 ± (71.22 - 71.51) ms71.17 ± (71.05 - 71.29) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.13 - 16.38) MB15.99 ± (15.83 - 16.15) MB-1.6%
runtime.dotnet.threads.count19 ± (19 - 20)19 ± (19 - 19)-1.5%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms419.18 ± (417.71 - 420.64) ms597.97 ± (594.92 - 601.01) ms+42.7%✅⬆️
process.time_to_main_ms524.80 ± (523.65 - 525.96) ms527.07 ± (526.13 - 528.01) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.91 ± (60.86 - 60.96) MB61.75 ± (61.65 - 61.85) MB+1.4%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms191.15 ± (190.81 - 191.49) ms190.08 ± (189.80 - 190.36) ms-0.6%
process.time_to_main_ms70.04 ± (69.82 - 70.26) ms69.78 ± (69.58 - 69.98) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.71 ± (11.68 - 11.74) MB11.85 ± (11.82 - 11.88) MB+1.2%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.6%
.NET 8 - Bailout
process.internal_duration_ms189.51 ± (189.18 - 189.85) ms189.57 ± (189.34 - 189.81) ms+0.0%✅⬆️
process.time_to_main_ms70.53 ± (70.40 - 70.66) ms70.74 ± (70.64 - 70.84) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.82 ± (11.79 - 11.86) MB11.85 ± (11.82 - 11.88) MB+0.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms342.54 ± (341.61 - 343.47) ms523.35 ± (520.95 - 525.75) ms+52.8%✅⬆️
process.time_to_main_ms482.13 ± (481.22 - 483.04) ms484.61 ± (483.93 - 485.29) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.88 ± (48.85 - 48.91) MB50.94 ± (50.91 - 50.97) MB+4.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 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 (8374) - mean (73ms)  : 70, 75
    master - mean (72ms)  : 70, 75

    section Bailout
    This PR (8374) - mean (77ms)  : 76, 79
    master - mean (76ms)  : 75, 77

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (1,081ms)  : 1033, 1129
    master - mean (1,077ms)  : 1028, 1127

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 (8374) - mean (113ms)  : 109, 117
    master - mean (113ms)  : 108, 117

    section Bailout
    This PR (8374) - mean (115ms)  : 113, 118
    master - mean (114ms)  : 111, 117

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (799ms)  : 779, 818
    master - mean (796ms)  : 778, 813

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8374) - mean (100ms)  : 97, 103
    master - mean (99ms)  : 95, 103

    section Bailout
    This PR (8374) - mean (100ms)  : 98, 103
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (947ms)  : crit, 909, 985
    master - mean (786ms)  : 764, 808

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

    section Bailout
    This PR (8374) - mean (99ms)  : 97, 102
    master - mean (99ms)  : 97, 101

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (829ms)  : crit, 799, 859
    master - mean (690ms)  : 670, 710

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 (8374) - mean (194ms)  : 189, 199
    master - mean (194ms)  : 190, 198

    section Bailout
    This PR (8374) - mean (197ms)  : 195, 200
    master - mean (197ms)  : 195, 199

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (1,167ms)  : 1115, 1220
    master - mean (1,160ms)  : 1104, 1215

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 (8374) - mean (278ms)  : 272, 283
    master - mean (277ms)  : 272, 281

    section Bailout
    This PR (8374) - mean (279ms)  : 275, 284
    master - mean (278ms)  : 273, 283

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (955ms)  : 927, 984
    master - mean (949ms)  : 924, 975

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8374) - mean (272ms)  : 264, 279
    master - mean (272ms)  : 267, 277

    section Bailout
    This PR (8374) - mean (270ms)  : 267, 273
    master - mean (272ms)  : 267, 277

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (1,156ms)  : crit, 1110, 1202
    master - mean (973ms)  : 949, 996

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8374) - mean (269ms)  : 265, 274
    master - mean (271ms)  : 266, 276

    section Bailout
    This PR (8374) - mean (270ms)  : 267, 273
    master - mean (269ms)  : 265, 274

    section CallTarget+Inlining+NGEN
    This PR (8374) - mean (1,040ms)  : crit, 994, 1087
    master - mean (856ms)  : 824, 887

Loading

@link04 link04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank!

@andrewlock andrewlock merged commit 017e910 into master Mar 27, 2026
139 checks passed
@andrewlock andrewlock deleted the andrew/re-enable-lifetimemanager-tests branch March 27, 2026 13:39
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants