Skip to content

Fix NullPointerException in Exception Replay - #12429

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
jpbempel/fix-npe-getStackTrace
Sep 10, 2026
Merged

Fix NullPointerException in Exception Replay#12429
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
jpbempel/fix-npe-getStackTrace

Conversation

@jpbempel

@jpbempel jpbempel commented Sep 8, 2026

Copy link
Copy Markdown
Member

What Does This Do

For FastThrow, getStackTrace can return null instead of empty StackTraceElement array

Motivation

Additional Notes

Contributor Checklist

Jira ticket: DEBUG-6173

@jpbempel
jpbempel requested a review from a team as a code owner September 8, 2026 12:46
@jpbempel
jpbempel requested review from dudikeleti and removed request for a team September 8, 2026 12:46
@dd-octo-sts

dd-octo-sts Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@datadog-prod-us1-6 datadog-prod-us1-6 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.

Datadog Autotest: FAIL

The new null check calls getStackTrace() twice for each exception with a non-empty stack. The second call copies the stack array again before the circuit breaker can reject the exception.

Open Bits AI session

🤖 Datadog Autotest · Commit 4d4975a · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@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: 4d4975ac09

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@datadog-prod-us1-6

This comment has been minimized.

@pr-commenter

pr-commenter Bot commented Sep 8, 2026

Copy link
Copy Markdown

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1789019692 1789020019
end_time 2026-09-10T05:56:22 2026-09-10T06:01:49
git_branch master jpbempel/fix-npe-getStackTrace
git_commit_sha a4b447e 027c1bf
start_time 2026-09-10T05:54:53 2026-09-10T06:00:20
See matching parameters
Baseline Candidate
ci_job_id 2030681168 2030681168
ci_pipeline_id 136529958 136529958
cpu_model Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
git_commit_date 1789019009 1789019009

Summary

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

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-21.645µs; +13.039µs] or [-6.540%; +3.940%]
unstable
[-33.666µs; +25.245µs] or [-9.302%; +6.975%]
unstable
[-41.698µs; +34.423µs] or [-11.109%; +9.171%]
unstable
[+1.326µs; +177.458µs] or [+0.113%; +15.117%]
same
scenario:basic same same same unstable
[+13.500µs; +218.278µs] or [+1.353%; +21.871%]
same
scenario:loop same same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (361.927 µs) : 333, 391
.   : milestone, 362,
basic (341.859 µs) : 335, 349
.   : milestone, 342,
loop (8.116 ms) : 8051, 8180
.   : milestone, 8116,
section candidate
noprobe (357.716 µs) : 330, 385
.   : milestone, 358,
basic (338.694 µs) : 332, 346
.   : milestone, 339,
loop (8.116 ms) : 8052, 8181
.   : milestone, 8116,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 361.927 µs [333.31 µs, 390.545 µs]
basic 341.859 µs [334.961 µs, 348.757 µs]
loop 8.116 ms [8.051 ms, 8.18 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 357.716 µs [330.405 µs, 385.028 µs]
basic 338.694 µs [331.77 µs, 345.619 µs]
loop 8.116 ms [8.052 ms, 8.181 ms]

@dd-octo-sts

dd-octo-sts Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.90 s 14.66 s [+0.7%; +2.6%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.68 s 13.73 s [-1.3%; +0.6%] (no difference)
startup:petclinic:appsec:Agent 17.56 s 17.48 s [-0.3%; +1.3%] (no difference)
startup:petclinic:iast:Agent 17.43 s 16.84 s [-0.7%; +7.7%] (no difference)
startup:petclinic:profiling:Agent 17.36 s 17.41 s [-1.3%; +0.7%] (no difference)
startup:petclinic:sca:Agent 17.59 s 16.87 s [-0.1%; +8.7%] (no difference)
startup:petclinic:tracing:Agent 16.55 s 16.62 s [-1.3%; +0.5%] (no difference)

Commit: 027c1bfa · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@jpbempel jpbempel added comp: debugger Dynamic Instrumentation type: bug fix Bug fix labels Sep 8, 2026
@jpbempel
jpbempel enabled auto-merge September 9, 2026 05:21
@jpbempel
jpbempel requested review from a team and andreimatei and removed request for a team and dudikeleti September 9, 2026 05:46

@datadog-prod-us1-6 datadog-prod-us1-6 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.

Datadog Autotest: PASS

More details

The null check prevents Exception Replay from reading the length of a null stack trace. The existing empty-stack behavior and circuit-breaker path stay unchanged.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 0ca7ebe · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

For FastThrow, getStackTrace can return null instead of empty
StackTraceElement array
@jpbempel
jpbempel force-pushed the jpbempel/fix-npe-getStackTrace branch from 0ca7ebe to 027c1bf Compare September 10, 2026 05:44
@jpbempel
jpbempel added this pull request to the merge queue Sep 10, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 10, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-10 06:31:08 UTC ℹ️ Start processing command /merge


2026-09-10 06:31:14 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-09-10 07:25:15 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 59b0330 into master Sep 10, 2026
610 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/fix-npe-getStackTrace branch September 10, 2026 07:25
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants