Skip to content

test: fix debugger probe throwing getter flake#63944

Closed
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-expression-throws
Closed

test: fix debugger probe throwing getter flake#63944
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-expression-throws

Conversation

@trivikr

@trivikr trivikr commented Jun 16, 2026

Copy link
Copy Markdown
Member

Fixes a flaky debugger probe test seen in the macOS unusual-character path CI rerun.

The fixture previously placed both probe target statements at top level. If the
target script ran before those breakpoints were bound, both probes could be
missed and the fixture would stay alive until probe mode timed out.

This moves the target statements into the fixture's existing interval so they
remain available until the completion probe runs and clears the interval.

Refs: https://github.com/nodejs/node/actions/runs/27588057763/job/81562704514

Error Log
=== release test-debugger-probe-expression-throws ===
Path: parallel/test-debugger-probe-expression-throws
Error: --- stderr ---
[process 60703]: --- stderr ---
INSPECT_PROBE 60703: child stderr: "Debugger listening on ws://127.0.0.1:63110/03881a62-edc2-43dd-adc8-dd61c7d6367c\nFor help, see: [https://nodejs.org/learn/getting-started/debugging\n](https://nodejs.org/learn/getting-started/debugging/n)"
INSPECT_PROBE 60703: child stderr: "Debugger attached.\n"
INSPECT_PROBE 60703: CDP -> Runtime.enable
INSPECT_PROBE 60703: CDP <- Runtime.enable (success)
INSPECT_PROBE 60703: CDP -> Debugger.enable
INSPECT_PROBE 60703: CDP <- Debugger.enable (success)
INSPECT_PROBE 60703: CDP -> Debugger.setBreakpointByUrl
INSPECT_PROBE 60703: CDP <- Debugger.setBreakpointByUrl (success)
INSPECT_PROBE 60703: breakpoint set: id=2:15:0:^(.*[\/\\])?probe-throwing-getter\.js$ urlRegex=^(.*[\/\\])?probe-throwing-getter\.js$ locations=[]
INSPECT_PROBE 60703: CDP -> Debugger.setBreakpointByUrl
INSPECT_PROBE 60703: CDP <- Debugger.setBreakpointByUrl (success)
INSPECT_PROBE 60703: breakpoint set: id=2:16:0:^(.*[\/\\])?probe-throwing-getter\.js$ urlRegex=^(.*[\/\\])?probe-throwing-getter\.js$ locations=[]
INSPECT_PROBE 60703: CDP -> Runtime.runIfWaitingForDebugger
INSPECT_PROBE 60703: CDP <- Runtime.runIfWaitingForDebugger (success)
INSPECT_PROBE 60703: timeout fired: finished=false, inFlight=null, lastProbeIndex=null
INSPECT_PROBE 60703: finish: exitCode=1, terminal=timeout

[process 60703]: --- stdout ---
{"v":2,"probes":[{"expr":"holder.throwingGetter","target":{"suffix":"probe-throwing-getter.js","line":16}},{"expr":"markProbesDone()","target":{"suffix":"probe-throwing-getter.js","line":17}}],"results":[{"event":"timeout","pending":[0,1],"error":{"code":"probe_timeout","message":"Timed out after 30000ms waiting for probes: probe-throwing-getter.js:16, probe-throwing-getter.js:17"}}]}

[process 60703]: status = 1, signal = null
/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/child_process.js:112
    throw error;
    ^

Error: - process terminated with status 1, expected 0
    at Object.<anonymous> (/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/parallel/test-debugger-probe-expression-throws.js:21:1)
    at Module._compile (node:internal/modules/cjs/loader:1947:14)
    at Object..js (node:internal/modules/cjs/loader:2087:10)
    at Module.load (node:internal/modules/cjs/loader:1669:32)
    at Module._load (node:internal/modules/cjs/loader:1450:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:260:19)
    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
    at node:internal/main/run_main_module:33:47 {
  options: {
    cwd: '/Users/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/debugger',
    env: { NODE_DEBUG: 'inspect_probe' }
  },
  command: '/Users/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/out/Release/node inspect --json --probe probe-throwing-getter.js:16 --expr holder.throwingGetter --probe probe-throwing-getter.js:17 --expr markProbesDone() probe-throwing-getter.js'
}

Assisted-by: openai:gpt-5.5

Move the probe target statements into the fixture interval so they
remain available if breakpoint binding happens after the script first
runs. This preserves the throwing-expression coverage without depending
on two adjacent top-level statements being hit during startup.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 16, 2026
@trivikr trivikr added flaky-test Issues and PRs related to the tests with unstable failures on the CI. request-ci Add this label to start a Jenkins CI on a PR. debugger Issues and PRs related to the debugger subsystem. labels Jun 16, 2026
@trivikr trivikr requested a review from joyeecheung June 20, 2026 02:57
@trivikr trivikr added the review wanted PRs that need reviews. label Jun 22, 2026
@joyeecheung

joyeecheung commented Jun 24, 2026

Copy link
Copy Markdown
Member

It doesn't appear to me this would fix anything, the binding behavior should be very deterministic and I don't think they can cause any intermittent timeouts. Judging from the logs, the timeout is still caused by the same thing (paused event not being delievered) that had been haunting interactive tests too.

Have you verified in any way that this indeed fix the flake in github actions? It would be better use of both our time to not have this kind of PRs that don't seem to make much sense other than some AI-generated reasoning that isn't properly verified by a human being and doesn't hold up under scrutiny.

@trivikr

trivikr commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

Thank you, Joyee, for the review.

I agree that AI-generated reasoning not properly verified by a human being is not helpful,
and it is not a good use of maintainer time.

I've closed the other AI-assisted PRs created for the debugger subsystem.
I couldn't find a central issue which discussed this, so I created a new one in #64116 highlighting the question.

If I use AI assistance for looking into any debugger related flaky tests, I'll post the findings on the issue instead of creating new PRs.

@trivikr trivikr deleted the test-debugger-probe-expression-throws branch June 24, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debugger Issues and PRs related to the debugger subsystem. flaky-test Issues and PRs related to the tests with unstable failures on the CI. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. review wanted PRs that need reviews. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants