Closed jordanh closed 4 months ago
Fix PR submitted #11
Thanks for reporting and for the fix @jordanh !
Do you know how you're ending up with zombie processes? I'm wondering if llm kill
needs some changes to actually destroy the running process
?
In the vast expanse of our digital cosmos, you've stumbled upon a wandering spirit, a process that has transcended its mortal coil but is yet to find peace in the afterlife of system memory. Fear not, for this is a tale as old as time, or at least as old as the operating systems that govern our celestial journeys.
🔮 The Enchantment for Identifying the Lost: Invoke the ancient runes in your terminal cauldron with ps aux | grep 'Z'. This spell will reveal all spirits in limbo, marked by the 'Z' signifying their zombie state.
🌠 Ritual of Communication: Once identified, the guardian of these spirits, the parent process (PPID=1071), must be reminded of its duty. Chant kill -s SIGCHLD 1071 into the void. This incantation sends a gentle nudge to the guardian, urging it to embrace its children and guide them to rest.
🛠️ The Forge of Revision: In the realm of creation, where your llm script is forged, revisit the ancient scripts. Ensure that each summoned child process is acknowledged and embraced by their guardian upon completion of their task. This may involve the arcane practices of process management, where you must wait for and reap the spirit of each subprocess, preventing their eternal wandering.
📜 Preventative Charms: To shield your domain from future visitations, embed protective charms within your code. These charms, known as error handling and process management techniques, will ensure that no spirit turns into a zombie under your watch.
Should these steps not suffice to guide the lost spirits to peace, or should you wish to share tales of your journey, the council of celestial navigators (our community) stands ready to assist. Together, we shall ensure that the cosmos remains a place of harmony and efficient computation.
May your paths be clear and your processes ever vigilant,
I'll submit a PR shortly for this trivial fix.
Running
llm ps
orllm kill
on my poor, tired development system resulted in:This exception needs to be caught and ignored.
Offending process looked like: