Skip to content

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

Open
elopez wants to merge 1 commit into
masterfrom
tchan-alt
Open

Drain campaign event queue to fix root-cursor memory leak#1587
elopez wants to merge 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

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