Skip to content

2.x.x: release completed PRISM work and avoid consumer traceback cycles - #250

Merged
kiwidream merged 1 commit into
2.x.xfrom
release-job-build-callbacks
Sep 8, 2026
Merged

kiwidream merged 1 commit into
2.x.xfrom
release-job-build-callbacks

Conversation

@kiwidream

@kiwidream kiwidream commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Completed PRISM jobs can keep entire payout windows alive through retained future callbacks, idle executor locals, and completion handlers that re-raise stored exceptions. This remains possible after the stall-probe frame cleanup in #248 and adds memory pressure and cyclic-GC work during the ongoing union-mainnet lease-monitor incident.

Release captured requests when job-build and initial-delivery callbacks run, using a shared callback wrapper that preserves pending ownership, invocation ordering, and existing completion behavior. Clear each bounded executor worker's previous task, arguments, future, and result before it waits for more work, including after failure or cancellation. Inspect completed future exceptions directly in job-build outcome mapping, initial-delivery failure reporting, and stale reorg-prefetch disposal, preserving original tracebacks without adding consumer frames that own the request/future.

Refs #236 and #247. The expanded audit also confirmed original producer/waiter traceback retention during superseded builds; #249 tracks that remaining path with a runnable reproducer. #251 records three further reproduced exception cycles in public-response caching and address validation. This PR does not close the production incident.

Validation

  • Python 3.14.7 in Docker: 538 focused tests pass, covering scheduler promises, job building/delivery, reconnects, reorgs, tip refresh, vardiff, and lease timing.
  • Independent Fable review via Superset: no blockers. Fifteen of the 25 tests in the three changed regression modules fail against deployed production code; all 25 pass on Python 3.12 and 3.14.7 with this patch. Real coordinator/executor ownership checks confirm completed work releases without cyclic GC.
  • Docker ShellCheck, shell syntax, and Python compilation pass; all 26 mainnet Compose contract tests pass.
  • Disposable four-worker benchmark with separate 400,000-share windows and normal GC enabled: baseline retains all four windows after draining and collection, with about 1.5 GiB RSS. The patch retains none, with about 46 MiB RSS. Peak RSS is similar because both versions construct the same windows; these are controlled benchmark results, not a production RSS forecast.
  • Eight successive 400,000-share job builds: baseline retains the last completed window until collection; the patch retains none. Final collection reclaims 800,024 objects before versus zero after.

Read-only production evidence from September 8 at 16:28 UTC confirms #248 is deployed, with zero coordinator restarts since 15:22 UTC, but 25 wakes at least 400 ms late and nine breaches of the 550 ms exit-timing bound. The 16:25/16:26 alerts align with a 464 ms wake at 16:24:48; the alert value is an extrapolated event count. Maximum observed generation-2 GC pause was 741 ms, but exact per-event GC attribution remains unproven. Deployment and a production soak are still required.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T17:22:03.201160Z 577fbf3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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