Skip to content

Drain campaign event queue to fix root-cursor memory leak#1587

Merged
gustavo-grieco merged 1 commit into
masterfrom
tchan-alt
Jul 20, 2026
Merged

Drain campaign event queue to fix root-cursor memory leak#1587
gustavo-grieco merged 1 commit into
masterfrom
tchan-alt

Conversation

@elopez

@elopez elopez commented Jul 14, 2026

Copy link
Copy Markdown
Member

Every consumer reads campaign events from its own dupChan, so the original Chan's read end is never advanced and pins every event ever written, keeping the whole campaign's event history (including full VM snapshots) alive. Drain the original queue from a dedicated thread so the GC can reclaim delivered events, and publish VM-free, strictly forced copies of falsified/optimized tests so queued events can't retain a VM through a lazy thunk.

Every consumer reads campaign events from its own dupChan, so the
original Chan's read end is never advanced and pins every event ever
written, keeping the whole campaign's event history (including full VM
snapshots) alive. Drain the original queue from a dedicated thread so
the GC can reclaim delivered events, and publish VM-free, strictly
forced copies of falsified/optimized tests so queued events can't
retain a VM through a lazy thunk.
@elopez

elopez commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Alternative to #1576

@gustavo-grieco
gustavo-grieco merged commit 58d7fc5 into master Jul 20, 2026
17 checks passed
@gustavo-grieco
gustavo-grieco deleted the tchan-alt branch July 20, 2026 07:38
@gustavo-grieco gustavo-grieco mentioned this pull request Jul 24, 2026
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