[GH-ISSUE #8754] Index out of bonds when downloading a model #5680

Closed
opened 2026-04-12 16:58:32 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @kirys on GitHub (Feb 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8754

What is the issue?

I was trying to download the new mistral small model, and ollama container crashed during pull.

I just run
ollama pull mistral-small:latest
After a while it shows the download completed

pulling manifest pulling 102a747c1376... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 14 GB pulling 6db27cd4e277... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 695 B pulling 6d7b25ffd247... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 644 B pulling 43070e2d4e53... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling e0daf17ff83e... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 21 B

but the container crashed with this log

[GIN] 2025/02/01 - 09:04:06 | 200 | 16.982µs | 127.0.0.1 | HEAD "/"
time=2025-02-01T09:04:07.414Z level=INFO source=download.go:175 msg="downloading 102a747c1376 in 16 895 MB part(s)"
time=2025-02-01T09:17:16.845Z level=INFO source=download.go:175 msg="downloading 6db27cd4e277 in 1 695 B part(s)"
time=2025-02-01T09:17:18.147Z level=INFO source=download.go:175 msg="downloading 6d7b25ffd247 in 1 644 B part(s)"
time=2025-02-01T09:17:19.478Z level=INFO source=download.go:175 msg="downloading e0daf17ff83e in 1 21 B part(s)"
panic: runtime error: index out of range [0] with length 0

goroutine 66 [running]:
github.com/ollama/ollama/server.(*blobDownload).Prepare(0xc00026d500, {0x5584a3e8d430, 0xc000506b90}, 0xc0001d0b40, 0xc000191600)
github.com/ollama/ollama/server/download.go:175 +0x539
github.com/ollama/ollama/server.downloadBlob({0x5584a3e8d430, 0xc000506b90}, {{{0x5584a3a5726e, 0x5}, {0x5584a3a6b519, 0x12}, {0x5584a3a5fd4b, 0x7}, {0xc000435780, 0xd}, ...}, ...})
github.com/ollama/ollama/server/download.go:489 +0x4da
github.com/ollama/ollama/server.PullModel({0x5584a3e8d430, 0xc000506b90}, {0xc000435780, 0x14}, 0xc000191600, 0xc0001262f0)
github.com/ollama/ollama/server/images.go:889 +0x771
github.com/ollama/ollama/server.(*Server).PullHandler.func1()
github.com/ollama/ollama/server/routes.go:595 +0x197
created by github.com/ollama/ollama/server.(*Server).PullHandler in goroutine 50
github.com/ollama/ollama/server/routes.go:582 +0x691

OS

Linux

GPU

Nvidia

CPU

AMD

Ollama version

0.5.4-0-g2ddc32d-dirty

Originally created by @kirys on GitHub (Feb 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8754 ### What is the issue? I was trying to download the new mistral small model, and ollama container crashed during pull. I just run ollama pull mistral-small:latest After a while it shows the download completed `pulling manifest pulling 102a747c1376... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 14 GB pulling 6db27cd4e277... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 695 B pulling 6d7b25ffd247... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 644 B pulling 43070e2d4e53... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling e0daf17ff83e... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ 21 B ` but the container crashed with this log [GIN] 2025/02/01 - 09:04:06 | 200 | 16.982µs | 127.0.0.1 | HEAD "/" time=2025-02-01T09:04:07.414Z level=INFO source=download.go:175 msg="downloading 102a747c1376 in 16 895 MB part(s)" time=2025-02-01T09:17:16.845Z level=INFO source=download.go:175 msg="downloading 6db27cd4e277 in 1 695 B part(s)" time=2025-02-01T09:17:18.147Z level=INFO source=download.go:175 msg="downloading 6d7b25ffd247 in 1 644 B part(s)" time=2025-02-01T09:17:19.478Z level=INFO source=download.go:175 msg="downloading e0daf17ff83e in 1 21 B part(s)" panic: runtime error: index out of range [0] with length 0 goroutine 66 [running]: github.com/ollama/ollama/server.(*blobDownload).Prepare(0xc00026d500, {0x5584a3e8d430, 0xc000506b90}, 0xc0001d0b40, 0xc000191600) github.com/ollama/ollama/server/download.go:175 +0x539 github.com/ollama/ollama/server.downloadBlob({0x5584a3e8d430, 0xc000506b90}, {{{0x5584a3a5726e, 0x5}, {0x5584a3a6b519, 0x12}, {0x5584a3a5fd4b, 0x7}, {0xc000435780, 0xd}, ...}, ...}) github.com/ollama/ollama/server/download.go:489 +0x4da github.com/ollama/ollama/server.PullModel({0x5584a3e8d430, 0xc000506b90}, {0xc000435780, 0x14}, 0xc000191600, 0xc0001262f0) github.com/ollama/ollama/server/images.go:889 +0x771 github.com/ollama/ollama/server.(*Server).PullHandler.func1() github.com/ollama/ollama/server/routes.go:595 +0x197 created by github.com/ollama/ollama/server.(*Server).PullHandler in goroutine 50 github.com/ollama/ollama/server/routes.go:582 +0x691 ### OS Linux ### GPU Nvidia ### CPU AMD ### Ollama version 0.5.4-0-g2ddc32d-dirty
GiteaMirror added the bug label 2026-04-12 16:58:32 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 1, 2025):

https://github.com/ollama/ollama/issues/8400

<!-- gh-comment-id:2628962224 --> @rick-github commented on GitHub (Feb 1, 2025): https://github.com/ollama/ollama/issues/8400
Author
Owner

@AndrewKvalheim commented on GitHub (Feb 1, 2025):

Applying #8480 allowed the pull to succeed for me.

<!-- gh-comment-id:2629074850 --> @AndrewKvalheim commented on GitHub (Feb 1, 2025): Applying #8480 allowed the pull to succeed for me.
Author
Owner

@prusnak commented on GitHub (Feb 1, 2025):

fix in https://github.com/ollama/ollama/pull/8480

<!-- gh-comment-id:2629160201 --> @prusnak commented on GitHub (Feb 1, 2025): fix in https://github.com/ollama/ollama/pull/8480
Author
Owner

@rick-github commented on GitHub (Feb 14, 2025):

Fixed by #8746

<!-- gh-comment-id:2660521126 --> @rick-github commented on GitHub (Feb 14, 2025): Fixed by #8746
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5680