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
F15441401: D21466.id.diff
Wed, Mar 26, 6:01 PM
F15437043: D21466.diff
Tue, Mar 25, 5:09 PM
Unknown Object (File)
Feb 23 2025, 5:37 AM
Unknown Object (File)
Feb 17 2025, 4:07 AM
Unknown Object (File)
Feb 2 2025, 3:54 PM
Unknown Object (File)
Jan 28 2025, 5:41 AM
Unknown Object (File)
Jan 24 2025, 12:10 AM
Unknown Object (File)
Jan 23 2025, 6:48 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