Skip to content

Fix Node SDK proc scan process-exit race - #1295

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/fix-node-proc-race
Sep 28, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/fix-node-proc-race

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Treat both ENOENT and ESRCH as expected process-disappearance errors while
the Node SDK detached-anchor test scans /proc. This reuses the existing
isProcessGoneError helper and continues to surface unexpected filesystem
errors.

Resolves #1293

Tests

  • npm run build:test-unit
  • node --test --test-name-pattern="reaps the detached anchor after repeated probes" dist-tests\tests\unit\platform.test.js
Microsoft Reviewers: Open in CodeFlow

Use the shared process-disappearance predicate while enumerating /proc so a
process exiting between directory enumeration and status-file reads does not
fail the detached-anchor test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7b0285d2-142d-4d79-912e-7e8d22287db2
Copilot AI balanced review requested due to automatic review settings September 27, 2026 03:01
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner September 27, 2026 03:01
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly resolves the documented race without suppressing unrelated errors.

Review effort: Balanced
Findings: None

What changed in this PR

Updates the Node SDK Linux test helper to tolerate expected /proc process-exit races.

Changes:

  • Reuses isProcessGoneError to handle both ENOENT and ESRCH.
  • Continues rethrowing unexpected filesystem errors.
File Description
sdk/​node/​tests/​unit/​platform.test.ts Handles both expected process-disappearance errors during zombie scans.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Gudge (MGudgin) pushed a commit that referenced this pull request Sep 27, 2026
Restore the proc-scan behavior owned by PR #1295 so this branch remains
focused on worker readiness synchronization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7b0285d2-142d-4d79-912e-7e8d22287db2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

@MGudgin
Gudge (MGudgin) merged commit d7a15a2 into main Sep 28, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/fix-node-proc-race branch September 28, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Node SDK] Bubblewrap detached-anchor test races process exit during /proc scan

3 participants