[PR #6145] [MERGED] Fix crash on startup when trying to clean up unused files (#5840) #22574

Closed
opened 2026-04-19 16:25:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6145
Author: @jessegross
Created: 8/2/2024
Status: Merged
Merged: 8/7/2024
Merged by: @jessegross

Base: mainHead: jessegross/bug5840


📝 Commits (2)

  • 685a535 manifest: Don't prune layers if we can't open a manifest file
  • 1829fb6 manifest: Fix crash on startup when trying to clean up unused files (#5840)

📊 Changes

4 files changed (+64 additions, -37 deletions)

View changed files

📝 server/images.go (+27 -18)
📝 server/layer.go (+14 -1)
📝 server/manifest.go (+10 -8)
📝 server/routes.go (+13 -10)

📄 Description

Improve validation and error handling of manifest files in the event of corruption. This prevents nil pointer errors and possible unintended deletion of data.


🔄 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/6145 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 8/2/2024 **Status:** ✅ Merged **Merged:** 8/7/2024 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/bug5840` --- ### 📝 Commits (2) - [`685a535`](https://github.com/ollama/ollama/commit/685a53534b80a14efdfdb09ca00af984782ba6ee) manifest: Don't prune layers if we can't open a manifest file - [`1829fb6`](https://github.com/ollama/ollama/commit/1829fb61bd7a4186881714618f09b2877d0bc9a3) manifest: Fix crash on startup when trying to clean up unused files (#5840) ### 📊 Changes **4 files changed** (+64 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+27 -18) 📝 `server/layer.go` (+14 -1) 📝 `server/manifest.go` (+10 -8) 📝 `server/routes.go` (+13 -10) </details> ### 📄 Description Improve validation and error handling of manifest files in the event of corruption. This prevents nil pointer errors and possible unintended deletion of data. --- <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 16:25:14 -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#22574