Repository navigation
Conversation
CI Test ResultsRun: #46028393113 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Failed Jobs
Summary: Total: 108 | Passed: 107 | Failed: 1 Updated: 2026-11-27 16:20:04 UTC |
Reliability & Chaos Results✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/156816215 |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Nested continuation transitions can make frozen-stack recovery append suspended child callers instead of parent callers and incorrectly report the trace as complete.
🤖 Bits Code Review · Commit 746acbe
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
More details
Local JDK checks supported the stack-chunk layout and deoptimization metadata assumptions used to recover frozen callers. The completed static review identified no concrete regression within the examined scope.
🤖 Bits Code Review · Commit af03bf7
There was a problem hiding this comment.
More details
Frozen-stack reads require Java thread state and an interrupted Java-body PC, matching the safeguards described in the human PR discussion. Incomplete recovery preserves truncation.
🤖 Bits Code Review · Commit 833aceb
Scan-Build Report
Bug Summary
Filter Results by FileReports
|
|||||||||||||||||||||||||||||||||||||||||||||||||
88058a7 to
1bf3039
Compare
c444ade to
e0d4ae1
Compare
There was a problem hiding this comment.
More details
The completed static assessment raised no actionable correctness issue in frozen-caller recovery. Runtime behavior remains unverified because tests were not run.
🤖 Bits Code Review · Commit f3cb810
f3cb810 to
2f0372c
Compare
There was a problem hiding this comment.
More details
Frozen-caller recovery rejects non-Java thread states before reading continuation heap objects, consistent with the safepoint handling discussed on the PR. The completed static review produced no reportable defect; runtime behavior remains unvalidated.
🤖 Bits Code Review · Commit 2f0372c
…ts in vmKlass tests
…he native AGENTS.md
2f0372c to
24f8044
Compare
There was a problem hiding this comment.
More details
Frozen-caller recovery uses continuation-boundary and origin checks, with incomplete recovery retaining truncation. The static review raised no actionable findings; runtime behavior remains unverified.
🤖 Bits Code Review · Commit 24f8044
What does this PR do?:
Recover frozen Java callers from HotSpot stack chunks at a verified continuation boundary. Restore deoptimized and inlined callers while preserving truthful truncation when recovery is incomplete.
Motivation:
A partial thaw leaves older Java callers in the heap. Recovering carrier frames alone cannot restore that ancestry. This change appends the frozen callers before the continuation root or carrier walk.
Additional Notes:
Depends on fix(profiler): recover arm64 native stacks across sampling signals #917. The stack is fix(profiler): mark skipped frozen virtual-thread callers as truncated #877 → fix(profiler): encode debug unwind event sizes as varints #916 → feat(profiler): recover carrier ancestry at continuation boundaries #887 → fix(profiler): recover arm64 native stacks across sampling signals #917 → fix(profiler): recover frozen virtual-thread callers #879. Each PR retains tests for its own production behavior.
This delta contains heap recovery, its metadata and counters, focused regressions, and documentation. General DWARF, signal-frame, C1 temporary-stack, and native-test linking corrections belong to fix(profiler): recover arm64 native stacks across sampling signals #917; carrier-boundary corrections belong to feat(profiler): recover carrier ancestry at continuation boundaries #887.
Recovery requires HotSpot 21–27, G1/Serial/Parallel, supported metadata, and an interrupted Java body. Native/runtime transitions, unsupported collectors, and nested continuations retain the truncation fallback.
Native-call origins outside the freeze/thaw runtime use the first mounted Java frame the walk emitted. Classification requires libjvm's
freeze/thawentry templates, which are static, so their symbols use internal linkage (_ZL); the external spelling (_Z) is also accepted. A stripped libjvm keeps the conservative rejection.Behavior change, please acknowledge: the origin is recorded only after a Java frame is emitted. Any cursor-changing anchor redirect before that frame, including an SP/FP correction inside the same nmethod, now rejects the substitution, as stub-blob redirects already did.
The published layout is immutable after successful initialization. Missing metadata remains retryable.
MARK_CONT_RUNTIMEonly annotates libjvm freeze/thaw frames. They keep their symbol (or remote packing), and native walks continue through them. walkVM reads the mark to keep the interrupted-PC rejection.When recovery fails after some frozen frames were appended, those frames stay in the trace and the sample stays truncated. No
[skipped frames]marker is added; theJVM Continuationroot and the truncation flag identify the gap.High-arity assertions retain strict carrier ancestry and first-invalid-stack diagnostics. The reducer also accepts stacks whose older Java callers were recovered.
Chaos gate change, please acknowledge: in
ContinuationStackChecks, each layout's partial-thaw coverage check now also passes when the recording-widewalkvm_frozen_recoveredcounter reaches the minimum. Recovered samples are complete, so they no longer count as partial thaws, and JFR cannot attribute a recovery to a layout. Recoveries in one layout can therefore satisfy the other layout's check.Test design, please acknowledge:
ddprof-testtest JVMs get-XX:CompileCommand=dontinlineforFrozenVirtualThreadStackTest.sampledLeaf(noCompileCommand=quiet, so each test JVM echoes that one line), and the test fails ifsampledLeafis ever recorded as inlined. For an interrupted PC, walkVM approximates the leaf frame's inline chain with the nextPcDesc, and it does not flag the approximation. On GraalVM 25 aarch64, wheresampledLeafwas inlined into several recursive copies, one sample took another copy's chain and reported 7 extra callers. Its stack was still marked complete, so the exact caller-count check failed. The approximation is older than this PR and applies to every thread kind. PROF-16768 tracks whether to detect and flag it.Agentic review: on the head after the rebase onto fix(profiler): recover arm64 native stacks across sampling signals #917, Sphinx (standard, generalist only: no corpus) on the full range, then
/code-reviewmedium on the fix range, two runs. No Critical or High findings. Open Medium items:prepare_thaw_internal(non-template glue underContinuation::prepare_thaw) is not marked as freeze/thaw runtime. If the compiler emits it as a sibling call, a sample inside it has no marked frame on the stack.Config<oop_kind, ...>symbol match, and no gtest covers the compiled-frame branch ofappend; the Java tests cover compiled frozen frames on real JVMs.A later
/code-reviewmedium ofe0d4ae1b7and of its fix ranges found and fixed:_ZLentry names that kept classification always false, an origin taken from a frame the anchor redirect abandoned, a repeatedfindNMethodand the redundant freeze/thaw entry prefixes. Open Low items from those rounds: thejava_origin_pc == NULLguard is repeated at two call sites to skip the lookup; marking (Configsubstring) and classification (entry prefixes) are not coupled by construction; the linkage comment attributes the_ZLmangling to HotSpot rather than the compiler.The latest fixes (
bd190c21e..085f97a51: dead origin recording removed, a fault recovered insideappendcounted inwalkvm_frozen_failed, compiler fences around that flag, doc) had/code-reviewmedium on the fix range and twice on its follow-ups; no Critical or High finding. Open Low items from those rounds (round limit reached): no test covers resetting theappendflag after a successful recovery; the high-arity test no longer proves that a sample had frozen callers to recover;FrozenStackWalker.mddoes not say that a faulted attempt adds no frame or chunk counts, that it ends the walk withbreak_not_walkable(or discards an anchor-seeded walk), that the gtest recovers through a stand-in SIGSEGV handler, and it still calls the counters "debug counters".The absent-deoptimization-handler fix had
/code-reviewmedium and two fix rounds; no Critical or High finding. Open Low items from its last round: the test now takes the call size fromVMNMethod::deoptHandlerCallSize, so a typo in that constant is no longer caught; one new assertion inAbsentHandlerMatchesNoPcduplicatesRejectsJvmciReturnPcAfterHandlerCall.Open Low items: the remaining per-class freeze/thaw prefixes are redundant with the
Configmatch; later marking passes overwrite earlier marks; the doc and theMARK_CONT_RUNTIMEcomment describe the match loosely; theRemoteFramePackermark bits are always zero.Human review: mandatory. The change adds heap reads to the signal-handler stack walk (perf-critical, shared-library behavior).
Merge readiness depends on feat(profiler): recover carrier ancestry at continuation boundaries #887 and fix(profiler): recover arm64 native stacks across sampling signals #917 landing first.
History: rebuilt on the rebased fix(profiler): recover arm64 native stacks across sampling signals #917 as one feature commit that carries the earlier work-in-progress history, followed by the review fixes.
A frozen frame whose PC is a JVMCI deoptimization return address (handler +
NativeCall::instruction_size) is rejected instead of being treated as an ordinary PC, so its inline callers cannot be silently dropped.VMNMethod::originalPCtreats an absent (null) deoptimization handler as matching no PC; each handler falls back to the other. On JDK 21/22 the method-handle handler address can be null, so the old comparison did pointer arithmetic on null: UBSan reported it in theFrozenDeoptimizationTestchild under ASan, which then exited with status 1.A walk that crossed freeze/thaw runtime frames is marked truncated at every boundary kind: a sample inside thaw returns to the entry return PC while older callers are still frozen.
Validation for
24f804415(restacked on #9176999f70b2)::ddprof-lib:gtestDebug: passed (1,756 tests OK, 0 failed).RecoveredFaultInAppendCountsAsFailedfails without the landing-pad count;AbsentHandlerMatchesNoPcfails without either fallback.qualityChecksandspotlessCheck: passed.FrozenDeoptimizationTest(podman, glibc, JDK 21, asan): passed, 3 of 3, child exit 0, on176dc42dd. It failed 3 of 3 before the fix, as in CI.HighArityVirtualThreadStackTest(podman, glibc, JDK 25, debug): passed on355122c14(27 boundary samples, 0 continuation errors,notWalkable=0).FrozenDeoptimizationTest(Temurin 25.0.5, measured on4cc060b00): failed, 3 of 3,No frozen callers were recovered. The earlier heade0d4ae1b7fails the same way. No CI cell runs macOS tests. Tracked in PROF-16813.*VirtualThread*: inconclusive, all 11 tests skipped on this platform.724435173, glibc aarch64 25-graal release:FrozenVirtualThreadStackTest.restoresWhileCollecting[cstack=vm]failed once, then passed on retry: one application-Java sample was[sampledLeaf, JVM Continuation], truncated, with frozen recovery failed (recovered=653, failed=774). The cause is not identified:FrozenStackWalker::appendhas no per-reason failure counters. The stack is honestly marked truncated, but the test requires full recovery at application samples.How to test the change?:
For Datadog employees: