[PR #3122] [MERGED] Better tmpdir cleanup #21611

Closed
opened 2026-04-19 15:44:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3122
Author: @dhiltgen
Created: 3/13/2024
Status: Merged
Merged: 3/20/2024
Merged by: @dhiltgen

Base: mainHead: better_tmp_cleanup


📝 Commits (1)

📊 Changes

2 files changed (+52 additions, -1 deletions)

View changed files

📝 gpu/assets.go (+45 -0)
📝 llm/payload_common.go (+7 -1)

📄 Description

If expanding the runners fails, don't leave a corrupt/incomplete payloads dir. We now write a pid file out to the tmpdir, which allows us to scan for stale tmpdirs and remove this as long as there isn't still a process running.

Fixes #3051
Fixes #2472
Fixes #2658 (indirectly)

Verified on Mac, Linux and Windows.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/3122 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 3/13/2024 **Status:** ✅ Merged **Merged:** 3/20/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `better_tmp_cleanup` --- ### 📝 Commits (1) - [`74788b4`](https://github.com/ollama/ollama/commit/74788b487c3c3aa48715dfeb700871c61a63836d) Better tmpdir cleanup ### 📊 Changes **2 files changed** (+52 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `gpu/assets.go` (+45 -0) 📝 `llm/payload_common.go` (+7 -1) </details> ### 📄 Description If expanding the runners fails, don't leave a corrupt/incomplete payloads dir. We now write a pid file out to the tmpdir, which allows us to scan for stale tmpdirs and remove this as long as there isn't still a process running. Fixes #3051 Fixes #2472 Fixes #2658 (indirectly) Verified on Mac, Linux and Windows. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 15:44:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#21611