[GH-ISSUE #13919] Ollama serve spawns curl child processes that become zombies #71168

Closed
opened 2026-05-05 00:35:25 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @wrochow on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/13919

What is the issue?

What is the issue?

The /bin/ollama serve process spawns curl child processes (likely for health checks or API calls) but does not call wait() to reap them when they exit. This causes the curl processes to remain as zombie (defunct) processes.

Evidence

PID    PPID STAT  STARTED CMD
3229   1587 Z     Jan 24  [curl] <defunct>
4414   1587 Z     Jan 24  [curl] <defunct>
1587   1284 Ssl   Jan 24  /bin/ollama serve

Parent process: /bin/ollama serve (PID 1587)
Zombie processes: PIDs 3229 and 4414 (curl)
Started: January 24, 2026

Root Cause

Ollama spawns curl for health checks or API calls but doesn't properly call wait() on these child processes. When a child process exits but the parent doesn't reap it, it remains as a zombie process consuming a PID slot.

Expected Behavior

Child processes spawned by ollama serve should be properly reaped using wait(), waitpid(), or similar mechanisms to prevent zombie processes from accumulating.

Environment

  • Ollama version: 0.15.1
  • OS: Ubuntu 24.04 (WSL)
  • Installation method: Binary

Relevant log output


OS

Linux

GPU

No response

CPU

No response

Ollama version

0.15.1

Originally created by @wrochow on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/13919 ### What is the issue? ## What is the issue? The `/bin/ollama serve` process spawns `curl` child processes (likely for health checks or API calls) but does not call `wait()` to reap them when they exit. This causes the curl processes to remain as zombie (defunct) processes. ## Evidence ``` PID PPID STAT STARTED CMD 3229 1587 Z Jan 24 [curl] <defunct> 4414 1587 Z Jan 24 [curl] <defunct> 1587 1284 Ssl Jan 24 /bin/ollama serve ``` **Parent process:** `/bin/ollama serve` (PID 1587) **Zombie processes:** PIDs 3229 and 4414 (curl) **Started:** January 24, 2026 ## Root Cause Ollama spawns curl for health checks or API calls but doesn't properly call `wait()` on these child processes. When a child process exits but the parent doesn't reap it, it remains as a zombie process consuming a PID slot. ## Expected Behavior Child processes spawned by ollama serve should be properly reaped using `wait()`, `waitpid()`, or similar mechanisms to prevent zombie processes from accumulating. ## Environment - **Ollama version:** 0.15.1 - **OS:** Ubuntu 24.04 (WSL) - **Installation method:** Binary ### Relevant log output ```shell ``` ### OS Linux ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.15.1
GiteaMirror added the bug label 2026-05-05 00:35:25 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 26, 2026):

ollama serve does not spawn curl processes. /bin/ollama is not the usual location for the ollama binary. What's the result of

ls -l /bin/ollama
file /bin/ollama
<!-- gh-comment-id:3800648068 --> @rick-github commented on GitHub (Jan 26, 2026): `ollama serve` does not spawn curl processes. `/bin/ollama` is not the usual location for the ollama binary. What's the result of ``` ls -l /bin/ollama file /bin/ollama ```
Author
Owner

@wrochow commented on GitHub (Jan 26, 2026):

There is no /bin/ollama file or folder. I installed it directly from the pre-release packages so I could try out launch. I wonder if this might have been a WSL issue. I installed it with:
curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.15.1 sh

When I get a chance, I'll retry the entire process.

<!-- gh-comment-id:3800752329 --> @wrochow commented on GitHub (Jan 26, 2026): There is no /bin/ollama file or folder. I installed it directly from the pre-release packages so I could try out `launch`. I wonder if this might have been a WSL issue. I installed it with: `curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.15.1 sh` When I get a chance, I'll retry the entire process.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71168