-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
main does not terminate #6149
Comments
Greetings. I can confirm this behaviour. Larger models seem to trigger this more often than running a very small model such as phi2 (but it will happen eventually). Running Ubuntu 23.10 |
Setting the environment variable |
I can confirm that after some amount of time if I try to shut down the server executable [on Ubuntu] I will sometimes (inconsistently?) get this issue and have to kill the terminal to stop the process. |
If you can reproduce this and your computer is still responsive, the best way to find the cause would be to attach a debugger to the process and get a call stack. Run |
Running with
Without |
Using a debug build, it seems to be freezing at |
This could be the culprit. It did come from the commit I mentioned earlier.
It might be caused by something outside of this destructor, but the freeze appears to happen here. Removing it and recompiling causes the process to terminate, yet my computer still dramatically slows down afterward. Clearly there is something else going on. |
Reverted to this commit, and everything works fine. As suspected, switching to this commit or any commit after causes the aforementioned freezing. |
@slaren: Thank you, I tested it and it seems to work fine. |
Running Arch Linux, kernel 6.8.1
llama.cpp commit 2d15886
CPU: AMD Ryzen 9 5900HS, GPU: NVIDIA 3050 Ti Laptop (4GB VRAM)
After cloning the repo and running
make -j 8 LLAMA_CUBLAS=1 LLAMA_FAST=1
, I ran the command./main -t 4 -m models/fusionnet2x7b-q5_K_S.gguf -ngl 10 -n 256
.This was the output:
Even after the exit logs are printed, the
main
process does not exit. Trying to use^C
or^\
doesn't terminate the process either, it only causes my terminal to become unresponsive. CPU resources taken by the process do not seem to be freed. Soon after, my entire desktop environment freezes, and I am forced to go to a TTY to restart my computer, or if the freeze is especially bad, force-restart it.Running the command in a TTY only causes it to become completely unresponsive after the exit logs are printed.
Building the repository multiple times has not solved this issue. This issue occurs whether I use a model with an imatrix or a model with no imatrix.
I suspect the recent commit regarding the CUDA backend may have something to do with this, as I have only observed this behavior after updating to a commit on March 18, 2024. Omitting
-ngl 10
from the command doesn't resolve the issue, though.Regardless, this bug has made
main
largely unusable for me.The text was updated successfully, but these errors were encountered: