Local-AI Service Is Unkillable on Ubuntu 24.04 #3483
Replies: 2 comments
-
I noticed the same yesterday when after I installed by the install.sh, it didn't work out of the box and I wanted retry once more. To my surprise, I couldn't find it in my Docker desktop, inside docker within Ubuntu, no containers, no images nothing. Only thing I did find is that it is installed under /var/lib/docker and hopefully I can delete everything out of there and try again. But I am nervous it might leave some trails behind and may not be complete removal. Need to highlight this in "Issues" rather than in "Discussions" for it to get noticed I guess. Update: I just converted this as an Issue. Hope you don't mind. |
Beta Was this translation helpful? Give feedback.
-
Stop trolling - LocalAI does nothing to keep the process alive. |
Beta Was this translation helpful? Give feedback.
-
Hey there, everyone. I've been Googling this question for the last day and spent a good half hour or so searching the GitHub discussions for a related thread. Hopefully, there wasn't a super obvious search term that I overlooked.
Basically, my issue is as described in the title. After playing with this application for a bit, I realized that there was no "stop" or "terminate" command clearly listed in any of the documentation (either via
-help
flag or the .io website). Since I had a resource monitor actively measuring resource usage, I went ahead and issued a KILL signal to thelocal-ai
process. It appeared to die for a few seconds... then, resurrected itself as a zombie process and started back up all over again.That didn't seem right at all.
I then attempted a
sudo kill -9 PROCESS_ID_HERE
on thelocal-ai
instance. Once again, it immediately started back up with a brand new PID. Quite concerning, but maybe it's not as serious as I'm thinking. I then decide to reboot my machine and check. To my surprise,local-ai
is up and running once again, even though I barely had time to open up a terminal and search for it, let alone issue thelocal-ai run
command to get a model up and going.This really gives me the heebie-jeebies, on top of the annoyance of now having roughly 1.2GB of RAM permanently dedicated to a
local-ai
instance that I might not want to have active every time I'm on my machine. Is there some way of killinglocal-ai
that's just hidden away in documentation? Could it be an odd compatibility bug that requires a bit of fiddling to remedy? Or, have I stumbled upon a genuine oversight that needs to be addressed?Please and thank you!
EDIT: After much investigation, I've discovered that the Local-AI service in Ubuntu actively and intentionally restarts itself anytime it is terminated. This is a pretty serious vulnerability that needs to be remedied. Not only does LocalAI not come with an uninstaller, but you literally cannot uninstall LocalAI completely from Ubuntu 24.04 unless you spam kill commands to the process while simultaneously attempting to delete the service before it starts itself back up. The only reason I even thought to do this is because I happen to know that there's a short window between Zombie state and process reinitialization in memory that can be exploited to terminate a problematic process before it fully gains a foothold.
I will be warning other AI users about this flaw and cautioning them against using LocalAI until it is remedied. A Linux service should never, under any circumstances, engage in this behavior unless it is absolutely vital to machine functioning. This needs to be taken seriously as a potential security threat.
Beta Was this translation helpful? Give feedback.
All reactions