Page MenuHomePhabricator

Fix a slow memory leak in long-lived FutureIterator objects, as used by FuturePool
ClosedPublic

Authored by epriestley on Sep 17 2020, 7:52 PM.
Tags
None
Referenced Files
F18878340: D21466.diff
Thu, Nov 6, 4:59 PM
F18838956: D21466.id51095.diff
Mon, Oct 27, 1:39 PM
F18820094: D21466.id51095.diff
Wed, Oct 22, 12:31 PM
F18630987: D21466.diff
Sep 16 2025, 1:51 PM
F18530482: D21466.id51094.diff
Sep 7 2025, 1:25 AM
F18517671: D21466.id51095.diff
Sep 5 2025, 1:47 PM
F18512191: D21466.diff
Sep 5 2025, 7:43 AM
F18380516: D21466.diff
Aug 28 2025, 5:52 PM
Subscribers
None

Details

Summary

See T13572. FutureIterator does not release futures, so long-lived iterators (like the one that FuturePool may build) can end up leaking memory.

This affects the FuturePool used by the daemon overseer.

See T13572 for more discussion.

Test Plan
  • Ran the simple FutureIterator script from T13572. Before: memory held during iteration, script grows without bound. After: memory released, script uses stable memory.
  • Ran the overseer with memory logging and an immediate wakeup from hibernation. Before: saw memory usage grow without bound at a rate of ~300MB/day. After: saw memory usage stable.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable