debugger: preserve overlapping CDP request state#64467
Open
trivikr wants to merge 1 commit into
Open
Conversation
A Debugger.paused event can arrive before the response to the resume request that triggered it. The resulting probe evaluation replaces the resume request in `inFlight`, but the resume cleanup then clears the newer request's state. Only clear `inFlight` when it still refers to the request being completed. Add a deterministic regression test for this event ordering. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.6-sol
Member
Author
|
The stress test isn't runnable on Windows environments mentioned in reports, as clang is not available Discussion on Slack: https://openjs-foundation.slack.com/archives/C03BJP63CH0/p1783477923723679 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64467 +/- ##
==========================================
+ Coverage 90.23% 90.24% +0.01%
==========================================
Files 741 741
Lines 241604 241607 +3
Branches 45520 45522 +2
==========================================
+ Hits 218010 218042 +32
+ Misses 15120 15114 -6
+ Partials 8474 8451 -23
🚀 New features to boost your workflow:
|
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.
A breakpoint pause can arrive before the preceding
Debugger.resumerequest has finished. When that happens, the probe evaluation becomes the
current
inFlightrequest, but the older resume request clears it when itfinishes.
If the target exits during the probe evaluation, we then lose the
information needed to attribute the failure to that probe. This caused the
test to intermittently report the probe as still pending, most notably on
Windows CI.
This change makes each request clear
inFlightonly when it still ownsthat state. It also adds a deterministic regression test that reproduces
the ordering without relying on inspector timing.
Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20test-debugger-probe-failure-process-exit
Example Error
Assisted-by: openai:gpt-5.6-sol