[GH-ISSUE #7003] Ollama freezes when specifying chat roles for some models. #30196

Closed
opened 2026-04-22 09:43:09 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @lumost on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7003

What is the issue?

When testing llava-llama3 on an agentic task of interpreting an image and generating an action. I specified the role of the 'environment' as 'environment'. This leads to ollama freezing in the chat dialog. Likewise, when running bakllava - ollama freezes when multiple system role messages are included in the chat dialog.

While it's understandable that the model and it's associated template can't support arbitrary roles or have restrictions on the usage of roles. The behavior of freezing and spinning at 100% CPU is a defect in ollama. It would be preferable to throw an error in these cases that the template cannot be compiled.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

No response

Originally created by @lumost on GitHub (Sep 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7003 ### What is the issue? When testing llava-llama3 on an agentic task of interpreting an image and generating an action. I specified the role of the 'environment' as 'environment'. This leads to ollama freezing in the chat dialog. Likewise, when running bakllava - ollama freezes when multiple `system` role messages are included in the chat dialog. While it's understandable that the model and it's associated template can't support arbitrary roles or have restrictions on the usage of roles. The behavior of freezing and spinning at 100% CPU is a defect in ollama. It would be preferable to throw an error in these cases that the template cannot be compiled. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version _No response_
GiteaMirror added the needs more infobug labels 2026-04-22 09:43:09 -05:00
Author
Owner

@rick-github commented on GitHub (Sep 27, 2024):

Could you add the specific payload you use that causes the lockup? It would make it easier to debug. Server logs would also be useful.

<!-- gh-comment-id:2379508485 --> @rick-github commented on GitHub (Sep 27, 2024): Could you add the specific payload you use that causes the lockup? It would make it easier to debug. Server logs would also be useful.
Author
Owner

@lumost commented on GitHub (Sep 27, 2024):

Sure thing, I can provide examples tonight when I'm home. For server logs, is there a flag to enable debug logging in ollama? I had trouble locating any logs on the system.

In general, it may be useful to have the option to have "debug" logging of the generated templates pre and post inference.

<!-- gh-comment-id:2379547172 --> @lumost commented on GitHub (Sep 27, 2024): Sure thing, I can provide examples tonight when I'm home. For server logs, is there a flag to enable debug logging in ollama? I had trouble locating any logs on the system. In general, it may be useful to have the option to have "debug" logging of the generated templates pre and post inference.
Author
Owner

@rick-github commented on GitHub (Sep 27, 2024):

journalctl -u ollama --no-pager to get logs. For more detailed logs (which may be required here), add OLLAMA_DEBUG=1 to the server environment.

<!-- gh-comment-id:2380291259 --> @rick-github commented on GitHub (Sep 27, 2024): [`journalctl -u ollama --no-pager`](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues) to get logs. For more detailed logs (which may be required here), add `OLLAMA_DEBUG=1` to the [server environment](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#30196