Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds four small TLA+ models and four deterministic regression tests for lifecycle and concurrency failures in tracer-core.
This remains a diagnostic draft. It intentionally contains no production fixes, so all four regression tests fail on the current implementation. The models, configuration, run instructions, and tests are the complete scope; continuation experiments and unrelated components are excluded.
Suggested priority
These priorities are relative engineering triage recommendations, not incident severity declarations.
RemoteWriter.close()then interrupts the sampling pipeline, allowing sampled spans to be silently lost during normal shutdown.isEnqueued. A later child cannot requeue the trace, so that child span is never sent.CoreTracer.flush()drains a trace with an unfinished child; child finishes afterward.write(), without incrementingdumpCounter. Flare preparation then waits indefinitely.CoreTracer.flush()in the modeled order.Why findings 1 and 2 are first
Both can silently lose trace data through public lifecycle operations without buffer saturation or an explicitly experimental feature. Finding 1 also affects shutdown, where no later activity can recover the accepted spans. Finding 2 leaves the trace permanently ineligible for requeue after the flush drain.
Finding 3 has comparable ownership-loss consequences but requires the experimental long-running trace feature and tracker saturation. Finding 4 blocks diagnostic flare generation rather than application tracing, and requires a narrower command ordering.
Findings and evidence
1. Single-span-sampling flush bypass
TraceProcessingWorker.flush()places its barrier directly in the primary serialization queue. It does not first synchronize with the upstreamSpanSamplingWorker.formal-methods/span-sampling-flush/SpanSamplingFlush.tlaFlushCoversAcceptedCandidateTraceProcessingWorkerTest.flushWaitsForInFlightSingleSpanSamplingexpected: <1>serialized trace butwas: <0>2. Pending-trace flush leaves stale queue ownership
The normal worker path clears
isEnqueuedbefore writing.WriteDrain.acceptwrites without clearing it, so a later child finish cannot requeue the trace.formal-methods/pending-trace-flush/FlushDrainOwnership.tlaPendingChildHasWriterPendingTraceBufferTest.flushDrainClearsEnqueuedStateBeforeWritingexpected: <0>forisEnqueued, butwas: <1>3. Full long-running tracker loses trace ownership
LongRunningTracesTracker.addtransitionsTO_TRACK -> TRACKED, butaddTracedrops at capacity andaddstill returnstrue. The pending-buffer worker therefore skips its fallback write path.formal-methods/long-running-traces/TrackerOwnership.tlaLiveTraceHasOwnerLongRunningTracesTrackerTest.fullTrackerLeavesOverflowTraceForBufferFallbackexpected: <false>butwas: <true>4. Flush consumes tracer-flare dump marker
FLUSH_ELEMENTbulk-drains subsequent elements throughElement.write().DUMP_ELEMENTis aCommandElementwith a no-opwrite(), so its marker disappears without acknowledgement.formal-methods/flush-dump-marker/FlushDumpMarker.tlaWaitingDumpHasOwnerPendingTraceBufferTest.flushDrainDoesNotConsumeTracerDumpMarkerTimeoutExceptionwhile waiting for flare preparationValidation
./gradlew :dd-trace-core:spotlessJavaCheckpasses.git diff --checkpasses.Scope and review intent
This PR is intended to establish reproducible evidence and help decide fix order. It contains only formal models, run documentation, and regression tests. It deliberately does not include production fixes and should remain draft / do-not-merge until the findings are split or fixed.