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
F18380516: D21466.diff
Thu, Aug 28, 5:52 PM
F18170116: D21466.diff
Fri, Aug 15, 5:48 PM
F18101277: D21466.id.diff
Sat, Aug 9, 12:25 PM
F18096744: D21466.id51094.diff
Fri, Aug 8, 8:51 AM
F17919156: D21466.id51095.diff
Jul 30 2025, 2:09 AM
F17814473: D21466.id.diff
Jul 25 2025, 9:12 PM
F17805283: D21466.id51094.diff
Jul 25 2025, 12:25 PM
Unknown Object (File)
Jun 5 2025, 5:03 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