Skip to content

Conversation

@mmarchini
Copy link
Contributor

NodeRuntime.waitingForDebugger is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when inspector.waitForDebugger() is called). This allows inspecting processes to know when the inspected process is waiting for a Runtime.runIfWaitingForDebugger message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following:

  • Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it
  • Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct
  • Simplify test-inspector-multisession-ws

There might be value in adding NodeWorker.waitingForDebugger in a future patch, but as of right now, no Node.js core inspector tests using worker threads are failing due to race conditions.

Fixes: #34730

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jan 24, 2024
@MoLow
Copy link
Member

linter seems to fail

Copy link

@koko1928koko1928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be failing in Linters.

@mmarchinimmarchiniforce-pushed the inspector/waitingForDebuggerEvent branch from 7c3a8e3 to ac5867dCompareJanuary 25, 2024 19:53
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when `inspector.waitForDebugger()` is called). This allows inspecting processes to know when the inspected process is waiting for a `Runtime.runIfWaitingForDebugger` message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following: * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it * Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct * Simplify test-inspector-multisession-ws There might be value in adding `NodeWorker.waitingForDebugger` in a future patch, but as of right now, no Node.js core inspector tests using worker threads are not failing due to race conditions. Fixes: nodejs#34730
@mmarchinimmarchiniforce-pushed the inspector/waitingForDebuggerEvent branch from ac5867d to 9ec34cbCompareJanuary 25, 2024 19:59
@richardlaurichardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 26, 2024
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 26, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@lpincalpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@joyeecheung
Copy link
Member

Stress test for flaked tests on RHEL boxes: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/475/ (reference nodejs/reliability#787)

@joyeecheungjoyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 23, 2024
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 23, 2024
@nodejs-github-bot
Copy link
Collaborator

HerWayBit

This comment was marked as abuse.

@nodejs-github-bot
Copy link
Collaborator

@joyeecheungjoyeecheung added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 23, 2024
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 23, 2024
@nodejs-github-botnodejs-github-bot merged commit 0161ad0 into nodejs:mainFeb 23, 2024
@nodejs-github-bot
Copy link
Collaborator

Landed in 0161ad0

marco-ippolito pushed a commit that referenced this pull request Feb 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when `inspector.waitForDebugger()` is called). This allows inspecting processes to know when the inspected process is waiting for a `Runtime.runIfWaitingForDebugger` message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following: * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it * Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct * Simplify test-inspector-multisession-ws There might be value in adding `NodeWorker.waitingForDebugger` in a future patch, but as of right now, no Node.js core inspector tests using worker threads are not failing due to race conditions. Fixes: #34730 PR-URL: #51560 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Feb 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when `inspector.waitForDebugger()` is called). This allows inspecting processes to know when the inspected process is waiting for a `Runtime.runIfWaitingForDebugger` message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following: * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it * Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct * Simplify test-inspector-multisession-ws There might be value in adding `NodeWorker.waitingForDebugger` in a future patch, but as of right now, no Node.js core inspector tests using worker threads are not failing due to race conditions. Fixes: #34730 PR-URL: #51560 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Feb 27, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when `inspector.waitForDebugger()` is called). This allows inspecting processes to know when the inspected process is waiting for a `Runtime.runIfWaitingForDebugger` message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following: * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it * Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct * Simplify test-inspector-multisession-ws There might be value in adding `NodeWorker.waitingForDebugger` in a future patch, but as of right now, no Node.js core inspector tests using worker threads are not failing due to race conditions. Fixes: #34730 PR-URL: #51560 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
rdw-msft pushed a commit to rdw-msft/node that referenced this pull request Mar 26, 2024
`NodeRuntime.waitingForDebugger` is a new Inspector Protocol event that will fire when the process being inspected is waiting for the debugger (for example, when `inspector.waitForDebugger()` is called). This allows inspecting processes to know when the inspected process is waiting for a `Runtime.runIfWaitingForDebugger` message to resume execution. It allows tooling to resume execution of the inspected process as soon as it deems necessary, without having to guess if the inspected process is waiting or not, making the workflow more deterministic. With a more deterministic workflow, it is possible to update Node.js core tests to avoid race conditions that can cause flakiness. Therefore, tests were also changed as following: * Remove no-op Runtime.runIfWaitingForDebugger from tests that don't need it * Use NodeRuntime.waitingForDebugger in all tests that need Runtime.runIfWaitingForDebugger, to ensure order of operations is predictable and correct * Simplify test-inspector-multisession-ws There might be value in adding `NodeWorker.waitingForDebugger` in a future patch, but as of right now, no Node.js core inspector tests using worker threads are not failing due to race conditions. Fixes: nodejs#34730 PR-URL: nodejs#51560 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
lpinca added a commit to lpinca/node that referenced this pull request Sep 7, 2024
nodejs-github-bot pushed a commit that referenced this pull request Sep 12, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 12, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 13, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 13, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
lpinca added a commit to lpinca/node that referenced this pull request Sep 22, 2024
Use the `NodeRuntime.waitingForDebugger` event. Refs: nodejs#51560
targos pushed a commit that referenced this pull request Sep 22, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
@lpincalpinca mentioned this pull request Sep 23, 2024
nodejs-github-bot pushed a commit that referenced this pull request Sep 24, 2024
Use the `NodeRuntime.waitingForDebugger` event. Refs: #51560 PR-URL: #55058 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
targos pushed a commit that referenced this pull request Sep 26, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 2, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 2, 2024
Refs: #51560 PR-URL: #54827 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 4, 2024
Use the `NodeRuntime.waitingForDebugger` event. Refs: #51560 PR-URL: #55058 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Use the `NodeRuntime.waitingForDebugger` event. Refs: nodejs#51560 PR-URL: nodejs#55058 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Use the `NodeRuntime.waitingForDebugger` event. Refs: nodejs#51560 PR-URL: nodejs#55058 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
lpinca added a commit to lpinca/node that referenced this pull request Nov 28, 2024
nodejs-github-bot pushed a commit that referenced this pull request Dec 19, 2024
aduh95 pushed a commit that referenced this pull request Jan 2, 2025
aduh95 pushed a commit that referenced this pull request Jan 31, 2025
marco-ippolito pushed a commit that referenced this pull request Mar 6, 2025
marco-ippolito pushed a commit that referenced this pull request Mar 6, 2025
marco-ippolito pushed a commit that referenced this pull request Mar 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate test-inspector-multisession-ws

10 participants

@mmarchini@nodejs-github-bot@MoLow@joyeecheung@fhinkel@benjamingr@lpinca@HerWayBit@koko1928@richardlau