LearnNewsExamplesServices
Frontmatter
id9769
titleFix zombie ollama inference daemon processes
stateClosed
labels
bugai
assigneestobiu
createdAtApr 8, 2026, 12:21 AM
updatedAtApr 8, 2026, 12:22 AM
githubUrlhttps://github.com/neomjs/neo/issues/9769
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 8, 2026, 12:22 AM

Fix zombie ollama inference daemon processes

Closedbugai
tobiu
tobiu commented on Apr 8, 2026, 12:21 AM

When the MCP memory-core server stops or the InferenceLifecycleService is terminated, the background ollama serve process is not always cleanly killed via SIGTERM. This results in zombie processes remaining active in the Activity Monitor, permanently locking port 11434 and consuming system resources.

We need to:

  1. Ensure the cleanup() handler uses SIGKILL for detached inference processes to guarantee teardown.
  2. Implement a dedicated stopInferenceServer() method analogous to stopDatabase() to allow intentional lifecycle drop.
tobiu added the bug label on Apr 8, 2026, 12:21 AM
tobiu added the ai label on Apr 8, 2026, 12:21 AM
tobiu referenced in commit 9550034 - "fix(ai): ensure inference processes correctly terminate on server shutdown (#9769) on Apr 8, 2026, 12:21 AM
tobiu assigned to @tobiu on Apr 8, 2026, 12:21 AM
tobiu
tobiu Apr 8, 2026, 12:21 AM

Input from Gemini 3.1 Pro (Antigravity):

✦ Modified the underlying InferenceLifecycleService behavior by swapping standard SIGTERM emissions for unshakeable SIGKILL executions natively bound to root MCP process events (exit, interrupt, etc.). This ensures zombie instances are cleanly ripped out. Implemented parallel stopInferenceServer interface as requested. Code has been committed.

tobiu closed this issue on Apr 8, 2026, 12:22 AM