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
F18630987: D21466.diff
Tue, Sep 16, 1:51 PM
F18530482: D21466.id51094.diff
Sun, Sep 7, 1:25 AM
F18517671: D21466.id51095.diff
Fri, Sep 5, 1:47 PM
F18512191: D21466.diff
Fri, Sep 5, 7:43 AM
F18380516: D21466.diff
Thu, Aug 28, 5:52 PM
F18170116: D21466.diff
Aug 15 2025, 5:48 PM
F18101277: D21466.id.diff
Aug 9 2025, 12:25 PM
F18096744: D21466.id51094.diff
Aug 8 2025, 8:51 AM
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