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
Unknown Object (File)
Sat, Apr 27, 10:33 AM
Unknown Object (File)
Wed, Apr 17, 2:57 PM
Unknown Object (File)
Thu, Apr 11, 7:10 AM
Unknown Object (File)
Sat, Apr 6, 10:30 PM
Unknown Object (File)
Apr 3 2024, 3:37 PM
Unknown Object (File)
Apr 2 2024, 5:43 PM
Unknown Object (File)
Mar 29 2024, 2:03 PM
Unknown Object (File)
Mar 21 2024, 10:59 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
Branch
daemon3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15819
Build 20921: Run Core Tests
Build 20920: arc lint + arc unit

Event Timeline

src/daemon/PhutilDaemonPool.php
181

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.