Skip to content

Fix continuation cleanup when TimerTask is cancelled - #12464

Open
amarziali wants to merge 4 commits into
masterfrom
andrea.marziali/diag-fix-timer-cancel
Open

Fix continuation cleanup when TimerTask is cancelled#12464
amarziali wants to merge 4 commits into
masterfrom
andrea.marziali/diag-fix-timer-cancel

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Fix continuation cleanup when a scheduled TimerTask is cancelled.

The continuation diagnostic exposed that TimerTask.cancel() was not instrumented when inherited directly from java.util.TimerTask. The previous hierarchy matcher covered subclasses, but not the base class
where the inherited method is declared.

flowchart LR
  A[Timer schedules task] --> B[Continuation captured]
  B --> C[TimerTask.cancel]
  C -. previous matcher missed base method .-> D[Continuation leaked]
  C --> E[CancelAdvice releases continuation]
Loading

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali
amarziali added this pull request to stack #12465 September 11, 2026 13:34
@amarziali amarziali added type: bug fix Bug fix inst: java Core Java language instrumentation tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors labels Sep 11, 2026
@amarziali
amarziali removed this pull request from stack #12465 September 11, 2026 13:39
@amarziali
amarziali force-pushed the andrea.marziali/diag-fix-timer-cancel branch from d2923d6 to 78f11f3 Compare September 11, 2026 13:43
@amarziali
amarziali changed the base branch from andrea.marziali/diag2 to master September 11, 2026 13:43
@amarziali
amarziali marked this pull request as ready for review September 11, 2026 13:44
@amarziali
amarziali requested review from a team as code owners September 11, 2026 13:44
@amarziali
amarziali requested review from AlexeyKuznetsov-DD and jordan-wong and removed request for a team September 11, 2026 13:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T14:00:45.355125Z da0704f Manual request
🔒 Security Review Completed 2026-09-11T14:03:00.513057Z da0704f Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 78f11f3d23

ℹ️ 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".

@datadog-official

This comment has been minimized.

@amarziali

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: da0704f241

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: da0704f241

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@dd-octo-sts

dd-octo-sts Bot commented Sep 11, 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.72 s 14.72 s [-0.9%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 13.61 s 13.74 s [-2.0%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 17.62 s 16.90 s [-0.2%; +8.8%] (no difference)
startup:petclinic:iast:Agent 17.44 s 17.53 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 17.08 s 17.43 s [-3.1%; -0.9%] (maybe better)
startup:petclinic:sca:Agent 17.49 s 17.57 s [-1.4%; +0.5%] (no difference)
startup:petclinic:tracing:Agent 16.51 s 16.69 s [-2.1%; -0.1%] (maybe better)

Commit: 926bb11b · 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: java Core Java language instrumentation tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants