Skip to content

test: fix debugger probe throwing getter flake#63944

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

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. labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants