Skip to content

src: fix live lock between environments with blocked requests - #65520

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/web-locks-livelock-62644
Sep 2, 2026
Merged

src: fix live lock between environments with blocked requests#65520
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/web-locks-livelock-62644

Conversation

@IlyasShabi

Copy link
Copy Markdown
Member

LockManager::ProcessQueue() woke every other env with any pending request, even when none of those requests could make progress. Two envs with requests blocked on the same resource would wake each other back and forth forever.

This PR will wake another env only when one of its requests can make progress:

  • the request is grantable or
  • it uses ifAvailable, which must run its callback with null when the resource is unavailable.

Fixes #62644

@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 Aug 24, 2026
@IlyasShabi
IlyasShabi force-pushed the ishabi/web-locks-livelock-62644 branch from d979993 to 769b088 Compare August 24, 2026 17:43
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.07%. Comparing base (f9ab994) to head (358368a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/node_locks.cc 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65520      +/-   ##
==========================================
- Coverage   90.07%   90.07%   -0.01%     
==========================================
  Files         754      754              
  Lines      256395   256397       +2     
  Branches    48494    48501       +7     
==========================================
- Hits       230947   230946       -1     
- Misses      16563    16572       +9     
+ Partials     8885     8879       -6     
Files with missing lines Coverage Δ
src/node_locks.cc 75.14% <50.00%> (-2.08%) ⬇️

... and 29 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.

@IlyasShabi
IlyasShabi requested review from addaleax and jasnell August 25, 2026 07:51
@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 25, 2026
@nodejs-github-bot

This comment was marked as outdated.

@IlyasShabi IlyasShabi added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Aug 25, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

Signed-off-by: ishabi <ilyasshabi94@gmail.com>
@IlyasShabi
IlyasShabi force-pushed the ishabi/web-locks-livelock-62644 branch from 769b088 to 358368a Compare September 1, 2026 13:23
@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 2, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 0375d09 into nodejs:main Sep 2, 2026
72 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 0375d09

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 2, 2026
@IlyasShabi
IlyasShabi deleted the ishabi/web-locks-livelock-62644 branch September 2, 2026 06:59
aduh95 pushed a commit that referenced this pull request Sep 3, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
PR-URL: #65520
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. 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.

locks.request live lock

4 participants