Skip to content

Fix SpanStack active reference corruption#3853

Merged
bwoebi merged 2 commits into
masterfrom
levi/spanstack-active-reference
May 6, 2026
Merged

Fix SpanStack active reference corruption#3853
bwoebi merged 2 commits into
masterfrom
levi/spanstack-active-reference

Conversation

@morrisonlevi

Copy link
Copy Markdown
Collaborator

Description

This PR is stacked on #3851 so that needs to merge first.

This test demonstrates that the active span can be corrupted by turning it into a reference. This may be the cause of a customer crash identified by a crash report.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-official

datadog-official Bot commented May 1, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.68% (+0.04%)

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

@pr-commenter

pr-commenter Bot commented May 1, 2026

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2026-05-01 17:05:10

Comparing candidate commit ae8cb30 in PR branch levi/spanstack-active-reference with baseline commit a51ed01 in branch levi/parent-refcount.

Found 0 performance improvements and 4 performance regressions! Performance is the same for 190 metrics, 0 unstable metrics.

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+50.086ns; +134.114ns] or [+3.484%; +9.330%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+66.091ns; +135.309ns] or [+4.612%; +9.442%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+80.106ns; +165.694ns] or [+5.531%; +11.440%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+44.296ns; +142.104ns] or [+3.035%; +9.736%]

Base automatically changed from levi/parent-refcount to master May 5, 2026 11:22
@bwoebi bwoebi force-pushed the levi/spanstack-active-reference branch from ae8cb30 to 3b8e92b Compare May 5, 2026 11:23
@bwoebi bwoebi changed the title test(tracing): SpanStack active reference corruption Fix SpanStack active reference corruption May 6, 2026
@bwoebi bwoebi force-pushed the levi/spanstack-active-reference branch from bde7e56 to c489614 Compare May 6, 2026 15:17
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi bwoebi force-pushed the levi/spanstack-active-reference branch from c489614 to 189b253 Compare May 6, 2026 15:33
@bwoebi bwoebi marked this pull request as ready for review May 6, 2026 15:34
@bwoebi bwoebi requested a review from a team as a code owner May 6, 2026 15:34

@bwoebi bwoebi 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 for the reproducer!

@bwoebi bwoebi merged commit ced22cc into master May 6, 2026
2103 of 2122 checks passed
@bwoebi bwoebi deleted the levi/spanstack-active-reference branch May 6, 2026 16:22
@github-actions github-actions Bot added this to the 1.20.0 milestone May 6, 2026
@bwoebi bwoebi modified the milestones: 1.20.0, 1.19.2 May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants