ThinkFacility

Error messages

llama-server process has terminated: exit status 0xc0000409

The message

llama-server process has terminated: exit status 0xc0000409
Ollama 0.34.4 read September 25, 2026Ollamalocal modelsWindows

What it means

The program Ollama uses to run the model crashed on Windows, and 0xc0000409 is the code Windows gives that kind of abrupt stop. The code is shared by many unrelated crashes, so the text after it matters more.

What to do

Read the line after the Windows sentence (often a CUDA error) and update Ollama and your graphics driver. If you set OLLAMA_KV_CACHE_TYPE or OLLAMA_NUM_PARALLEL, unset them and try again.

On Windows the full message runs long. This is from a report in June 2026, on Ollama 0.30.7:

Error: 500 Internal Server Error: llama-server process has terminated: exit status 0xc0000409: The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

Ollama loads models by starting a helper program, llama-server, and this message means the helper died partway through. We read the code in Ollama 0.34.4: on Windows it turns the helper's exit code into hex and appends Windows' own description of that code. That's where the sentence about a malicious user comes from. Windows attaches it to code 0xc0000409 whatever the cause, and it doesn't mean anyone attacked your machine.

Older versions printed Error: llama runner process has terminated: exit status 0xc0000409 with no explanation after it. As of September 25, 2026, 105 issues in the ollama/ollama repo quote the code.

Why the code alone won't tell you much

A maintainer put it plainly back in 2024: "the status code isn't unique." In the reports we read, it followed a graphics driver error in some and a failed assertion (a check the code makes on itself) in another. So the useful part is anything Ollama printed after the Windows sentence, which is the last error line the helper wrote. In the 2026 reports it's usually a CUDA error from the NVIDIA side.

Cases maintainers have diagnosed

An older NVIDIA card. A GTX 1060 on 0.31.1 crashed on every model with CUDA error: the provided PTX was compiled with an unsupported toolchain (#17012). A maintainer said a fix merged on July 3, 2026 (#16994, which turns on flash attention for cards of that generation) would be in the next release. A laptop MX250 from the same generation crashed with CUDA error: shared object initialization failed instead (#17138, closed), and another report with that tail was still open on September 25 (#17627).

Cache quantization plus parallel requests. Phi-4 crashed with the full message above when OLLAMA_KV_CACHE_TYPE was set (#16650). A maintainer reproduced it with the original llama.cpp server, called it "a llama.cpp problem", and suggested unsetting either OLLAMA_KV_CACHE_TYPE or OLLAMA_NUM_PARALLEL. In the maintainer's sample of about 40 models only Phi crashed. The issue was still open on September 25.

A model-specific assertion. One model crashed on its second run with a GGML_ASSERT line in the log just before the overrun (#17406), and the maintainer pointed to a matching llama.cpp bug.

What to try, in order

Update Ollama first, since the older-card crash was fixed in a release. Update the NVIDIA or AMD driver next. If you've set any OLLAMA_ variables for memory or speed, remove them and restart the Ollama app from the tray, because that's the combination behind the Phi crash.

If it still fails, open server.log in %LOCALAPPDATA%\Ollama and look at the lines right before the crash. When you file an issue, include that log. It's the first thing the maintainers ask for on these reports.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • Error: 500 Internal Server Error: llama-server process has terminated: exit status 0xc0000409
  • exit status 0xc0000409: The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.
  • Error: llama runner process has terminated: exit status 0xc0000409
  • exit status 0xc0000409
  • STATUS_STACK_BUFFER_OVERRUN