Conversation
af60f5f to
830f243
Compare
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
… a crank When a vat's async operation (e.g. fetch) completes between cranks, the resulting syscall.resolve was buffered with immediate=false. Since no crank was active to flush the buffer, notifications were never delivered and the crank loop never restarted — causing the kernel to hang indefinitely. Fix: add isInCrank() to the kernel store's crank methods. In VatSyscall, check isInCrank() to determine the immediate flag: - During a crank (immediate=false): buffer as before for atomic flush - Outside a crank (immediate=true): enqueue directly to wake the run queue via the existing wakeUpTheRunQueue mechanism This unblocks any vat method that chains multiple E() calls with real async I/O between vats (e.g. coordinator → provider with fetch → coordinator → keyring → provider). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b0f2e24 to
9a8f97c
Compare
FUDCo
approved these changes
Feb 24, 2026
Contributor
FUDCo
left a comment
There was a problem hiding this comment.
Yup, I think this is right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetch) completes between cranks, the resultingsyscall.resolvewas buffered withimmediate=false. Since no crank was active to flush the buffer, notifications were never delivered and the crank loop never restarted — causing the kernel to hang indefinitely.isInCrank()to the kernel store's crank methods. InVatSyscall, checkisInCrank()to determine theimmediateflag: during a crank, buffer as before; outside a crank, enqueue immediately to wake the run queue.E()calls with real async I/O between vats (e.g.coordinator → provider(fetch) → coordinator → keyring → provider(fetch)).Test plan
isInCrank()(true during crank, false outside)immediate=true)redeemDelegationpipeline (5-hop E() chain with real fetch I/O) — previously hung, now completes🤖 Generated with Claude Code
Note
Medium Risk
Changes core syscall-to-queue behavior for
send/resolve/notify, which can affect scheduling and ordering across the kernel run loop, though the change is small and covered by new tests.Overview
Fixes a kernel hang by making vat syscalls that occur outside an active crank enqueue work immediately instead of buffering it for crank completion.
Adds
isInCrank()to crank methods / kernel store, and updatesVatSyscall(send,resolve, and resolved-subscribenotify) to set the queueimmediateflag based on!kernelStore.isInCrank(), with new unit tests covering both the new API and out-of-crank behavior.Written by Cursor Bugbot for commit 9a8f97c. This will update automatically on new commits. Configure here.