Skip to content

fix(wtf): synchronize helper activity assertion with pool updates - #958

Open
vincentkoc wants to merge 1 commit into
oven-sh:mainfrom
openclaw:fix/upstream-helper-assertion-lock-20261031
Open

vincentkoc wants to merge 1 commit into
oven-sh:mainfrom
openclaw:fix/upstream-helper-assertion-lock-20261031

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 31, 2026 •

Copy link
Copy Markdown

fix(wtf): synchronize helper activity assertion with pool updates

Bugzilla association: pending; no issue number or upstream review approval is claimed.

Reviewed by NOBODY (OOPS!).

ParallelHelperClient::runTask reads m_numActive outside the mutex that owns the pool counters. Take that mutex only around the assertion, then release it before running the task. This keeps the existing scheduling and completion owners and avoids the unsynchronized read.

Port the isolated correctness fix from openclaw#5. #838 changes the same owner but leaves this initial assertion unlocked.

  • Source/WTF/wtf/ParallelHelperPool.cpp:
    (ParallelHelperClient::runTask): Guard the activity assertion with the pool lock.

Base: e66916298091dd12469076fd854e135b03fb16ff. Prepared head: 48819ee548ab26be5473bd29ad986674895502e7.

Independent P0–P2 source review found no blocker. Callers release the mutex before runTask and the new scope releases it before task execution. No assertion was removed.

Fresh Linux ARM64 native proof: https://github.com/openclaw/WebKit/actions/runs/41215708481 qualified exact head 48819ee548ab26be5473bd29ad986674895502e7. A clean native Release build compiled ParallelHelperPool. All four selected basic-eden/weakmap default/no-cjit cases passed with four GC markers and concurrent GC, without skips/missing cases. JSC SHA-256 2dfee2b871ec71972734b7d16af42fbe7bc0108b14110bea88c7ca186ee278ac. This is native build/existing concurrent-GC regression proof, not TSan or an observed-race reproduction. Artifact 13048965994, verified ZIP SHA-256 4bfd63b5f03b63116b667c7433279530bd347986ea4021ec48fda5e5c6736137; all manifest entries match.

ParallelHelperClient::runTask reads m_numActive outside the mutex that owns the pool counters. Take that mutex only around the assertion, then release it before running the task. This keeps the existing scheduling and completion owners and avoids the unsynchronized read.

Port the isolated correctness fix from #5. oven-sh#838 changes the same owner but leaves this initial assertion unlocked.

* Source/WTF/wtf/ParallelHelperPool.cpp:
(ParallelHelperClient::runTask): Guard the activity assertion with the pool lock.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ed57b5b6-70f2-4ecc-b354-f3dafdb6e13e
Commits

Reviewing files that changed from the base of the PR and between e669162 and 48819ee.

Files selected for processing: 1
  • Source/WTF/wtf/ParallelHelperPool.cpp
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

2 participants