checklocks: guard async page I/O bookkeeping - #14348
Open
tamird wants to merge 5 commits into
Open
Conversation
Template merging discards comments that are not attached to declaration fields, including inline analyzer annotations. Preserve comments on surviving nodes and render declarations separately so hoisted imports cannot move another function's annotations. Keep original import declarations when removing duplicate specs so their comment positions remain valid. Reconstruct build constraints separately and continue omitting package documentation in instances. Extend the existing template fixture with inline annotations, reversed source order and imports from different files. Preserve existing inline prose in the anonymous-field fixture as well. Assisted-by: Codex
Analyzing runsc with its lockdep build tag exposes the validator's map and stack-trace allocations beneath recursive checkescape contracts. Define those contracts to exclude optional lock-validator bookkeeping. Exempt only AddGLock and DelGLock calls in generated mutexes, leaving underlying mutex operations and application allocations checked. This is an analysis-policy boundary, not a claim that lockdep execution is allocation-free. Keep the exclusion explicit in the locking package. Assisted-by: Codex
Contributor
Author
|
r? @nybidari Could you review asynchronous page-I/O bookkeeping and generic atomic-pointer contracts? Focused local Bazel checks passed. Upstream checks have not reported yet. This comparison currently includes the prerequisites linked in the description. Assisted-by: Codex |
Nogo currently reads ambient build tags instead of the analyzed target's transitioned context. Its binary wrapper also recreates binaries as libraries, losing binary-specific tags and analyzing a different source configuration from the compiler. Use the aspect target's Go context and analyze binaries through their actual compiled archive and export data. Keep internal test-package archive selection separate from generated test mains. A tagged binary regression detects missing tags, linked-away functions and conservative fallback after failed object inspection. Assisted-by: Codex
Recognize atomicbitops Racy methods as non-atomic operations. Permit mixed-mode RacyLoad only when all guards are held, and require atomic writes with all guards held exclusively. Distinguish shared-lock reads from lock-free atomic reads so an RLock cannot authorize writes. Check atomic uses of annotated globals at the consuming instruction instead of discarding that instruction. Keep unannotated-global behavior unchanged, preserve function and closure ignores, and distinguish writes to a global from stores of its address. Resolve generic instantiations to their original declarations before classifying atomic operations. This recognizes atomic.Pointer methods without bypassing package or mixed-access checks for generic calls. Assisted-by: Codex
Guard saver offsets, pending ranges and throughput counters, plus the loader's active-file list, wait accounting and per-file completion state. Require atomic access to loader errors and the first-unloaded-byte hint, with locked error stores. Check the async-load and chunk metadata pointers using the prerequisite generic atomic support. Enforce the chunk-growth, destruction, reference-counting and waste-cancellation helper contracts. Document phase-dependent chunk ownership instead of imposing a mutex rule on private construction and restore. Keep normal accesses checked and place the save-offset lifetime exception at its serial checkpoint caller. Identify parent mutexes lost through list, priority-queue and completion-record lookups, and explain passed-callback exceptions. Preserve prose for generated links, segment values and waiters without a recoverable owner, and retain pooled-waiter and mapping lifetimes. Assisted-by: Codex
tamird
force-pushed
the
checklocks-pgalloc-async-state
branch
from
August 22, 2026 16:19
18a2729 to
baa9d00
Compare
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.
Depends on #14283 and #14281. The change specific to this proposal is 18a2729. The current comparison against master also includes prerequisite commits; those prerequisites must land and be removed from this branch before submission.
Guard pending page ranges and throughput counters under the saver mutex. Guard the active MemoryFile list and loader wait accounting. Require atomic access to loader errors and the first-unloaded-byte hint, with locked error stores. Enforce the existing incRefLocked precondition.
Use the generic atomic classification from b11b0d7 to check the async-load state and chunk metadata pointers. Preserve growth locking, immutable slice headers and restore/destruction mapping changes.
Preserve lifecycle-only access to PagesFileOffset and document parent ownership of callbacks, segment values and waiters. The per-file completion callback is mutable and cleared after invocation. Keep prose contracts for passed callbacks, child-to-parent aliases and list links.
Assisted-by: Codex