Skip to content

src: fix --process-timeout message when exit waits - #66361

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:node-process-timeout-worker-exit-wait
Open

trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:node-process-timeout-worker-exit-wait

Conversation

@trivikr

@trivikr trivikr commented Sep 27, 2026

Copy link
Copy Markdown
Member

Fixes: #66360

process.exit(), uncaught exceptions and unhandled rejections exit through Environment::Exit(), which never calls OnEnvironmentStopping(). If a Worker blocked in a synchronous native call held up that exit past the deadline, the watchdog blamed the main thread.

Check Environment::is_stopping() and report that the process did not finish exiting instead.


Assisted-by: claude:opus-5.5

process.exit(), uncaught exceptions and unhandled rejections exit
through Environment::Exit(), which never calls OnEnvironmentStopping().
If a Worker blocked in a synchronous native call held up that exit past
the deadline, the watchdog blamed the main thread.

Check Environment::is_stopping() and report that the process did not
finish exiting instead.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.5
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Sep 27, 2026
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.36%. Comparing base (75e4bbe) to head (3ca961c).

Files with missing lines Patch % Lines
src/node_watchdog.cc 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66361      +/-   ##
==========================================
- Coverage   90.36%   90.36%   -0.01%     
==========================================
  Files         792      792              
  Lines      275398   275401       +3     
  Branches    52776    52773       -3     
==========================================
  Hits       248877   248877              
- Misses      16937    16939       +2     
- Partials     9584     9585       +1     
Files with missing lines Coverage Δ
src/node_watchdog.cc 79.31% <0.00%> (-0.52%) ⬇️

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to 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++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node --process-timeout blames the main thread when exit waits on a blocked Worker

2 participants