Skip to content

Sync main with release#309

Merged
wool-labs[bot] merged 5 commits into
mainfrom
release
Jul 14, 2026
Merged

Sync main with release#309
wool-labs[bot] merged 5 commits into
mainfrom
release

Conversation

@wool-labs

@wool-labs wool-labs Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Auto-generated by the sync branches workflow.

conradbzura and others added 5 commits July 13, 2026 18:17
Unlinking a shared-memory segment that another process had already
removed raised FileNotFoundError out of the owner's context exit,
aborting pool teardown, and the raise skipped the atexit unregister so
the fallback fired a second FileNotFoundError at interpreter shutdown.
The failure is reliable under rapid same-namespace pool teardown and
respawn, where a dying process's multiprocessing resource tracker
unlinks the deterministically named segment out from under the owner.

Owner exit now disarms the atexit fallback before unlinking and treats
a missing segment as a no-op, the fallback closure suppresses the same
error at shutdown, and the publisher block finalizer applies the same
disarm-before-unlink ordering so a failed unlink can never leave a
fallback armed.
Add regression tests for the double-unlink crash and the atexit
fallback double-fire, then pin the surrounding teardown contracts:
owner exit unlinks the segment, exceptional exit still tears down,
non-owners neither arm fallbacks nor unlink, namespaces stay reusable
across rapid enter/exit cycles, and overlapping same-namespace
generations unwind cleanly. Recording atexit wrappers pin the
disarm-before-unlink ordering for both the owner exit and the
publisher block finalizer, where an unsuppressed unlink error is the
only observable seam. Hypothesis properties generalize the regression
cases across arbitrary lifecycle interleavings, vanishing-segment
masks, and publisher add/drop sequences. Reword two overclaiming test
docstrings to match what their bodies assert.
Exercise the reported reproduction shapes end to end with real worker
pools: rapid same-namespace teardown and respawn, LIFO overlap, and
owner-first exit with a post-overlap respawn. A cross-process test
proves the genuine failure mechanism by letting an independent
interpreter's resource tracker unlink the shared segment and asserting
the owner still exits cleanly through real interpreter shutdown. A
strict xfail pins the known surviving-pool worker leak so the suite
flags its fix loudly when it lands.
A leaked-context owner interpreter shuts down with the atexit fallback
still armed after an independent attacher's resource tracker unlinked
the segment. The pre-fix bare lambda leaves an atexit traceback on
stderr at shutdown; the suppressing closure shuts down silently. This
is the first behavioral pin for the fallback's own suppression, which
coverage cannot see because it runs in an unmeasured interpreter.
@wool-labs wool-labs Bot merged commit b07223e into main Jul 14, 2026
1 check passed
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.

1 participant