Page MenuHomePhabricator

Fix an issue where daemons can stick in a pool
ClosedPublic

Authored by epriestley on Feb 28 2017, 4:10 PM.
Tags
None
Referenced Files
F19510508: D17433.id41916.diff
Sun, Jan 11, 10:53 AM
F19318578: D17433.id41916.diff
Thu, Dec 25, 7:00 AM
F19119947: D17433.diff
Dec 9 2025, 9:29 PM
F18981602: D17433.diff
Nov 17 2025, 4:07 AM
F18886436: D17433.id.diff
Nov 7 2025, 4:25 AM
F18876982: D17433.diff
Nov 6 2025, 5:11 AM
F18843205: D17433.diff
Oct 28 2025, 9:09 PM
F18842933: D17433.id41917.diff
Oct 28 2025, 7:47 PM
Subscribers
None

Details

Summary

Ref T12331. Root problem is the unset($daemon) just unsets a key in a local variable, rather than actually discarding the daemon.

Add some logging to make this more clear and clean up some %d vs %s stuff.

Test Plan
  • Ran a pool with bin/phd debug task --pool N, let it scale up, let it scale down, used bin/worker flood to add more tasks.
  • Before patch, the ghost daemons took up the slots in the pool.
  • After patch, the ghost daemons got removed properly and were replaced with fresh daemons.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/daemon/PhutilDaemonPool.php
181–188

Specifically, this is the actual bugfix.

🤷 ¯\_(ツ)_/¯

This revision is now accepted and ready to land.Feb 28 2017, 4:12 PM
This revision was automatically updated to reflect the committed changes.