[GH-ISSUE #619] Segfault when using /show parameters #274

Closed
opened 2026-04-12 09:48:52 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lstep on GitHub (Sep 27, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/619

From a fresh install (curl https://ollama.ai/install.sh | sh on Ubuntu Linux 22.04) using ollama run codeup:13b-llama2-chat-q4_K_M, runs but when I try /show parameters, generates a segfault:

>>> /list
NAME                         	ID          	SIZE  	MODIFIED     
codeup:13b-llama2-chat-q4_K_M	d9c411941357	7.9 GB	12 hours ago	
>>> /show parameters
error: couldn't get model
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xb06e2b]

goroutine 1 [running]:
github.com/jmorganca/ollama/cmd.generateInteractive(0xb043a7?, {0x7fff9c765523, 0x1d})
	/go/src/github.com/jmorganca/ollama/cmd/cmd.go:660 +0x17cb
github.com/jmorganca/ollama/cmd.RunGenerate(0x7fff9c765523?, {0xc0003df100, 0x1, 0x1?})
	/go/src/github.com/jmorganca/ollama/cmd/cmd.go:389 +0xcf
github.com/jmorganca/ollama/cmd.RunHandler(0xc0001d9c00?, {0xc0003df100?, 0x1, 0x1})
	/go/src/github.com/jmorganca/ollama/cmd/cmd.go:145 +0x25c
github.com/spf13/cobra.(*Command).execute(0xc0003a5800, {0xc0003df0d0, 0x1, 0x1})
	/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003a4f00)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:985
main.main()
	/go/src/github.com/jmorganca/ollama/main.go:11 +0x4d
Originally created by @lstep on GitHub (Sep 27, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/619 From a fresh install (`curl https://ollama.ai/install.sh | sh` on Ubuntu Linux 22.04) using `ollama run codeup:13b-llama2-chat-q4_K_M`, runs but when I try `/show parameters`, generates a segfault: ``` >>> /list NAME ID SIZE MODIFIED codeup:13b-llama2-chat-q4_K_M d9c411941357 7.9 GB 12 hours ago >>> /show parameters error: couldn't get model panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xb06e2b] goroutine 1 [running]: github.com/jmorganca/ollama/cmd.generateInteractive(0xb043a7?, {0x7fff9c765523, 0x1d}) /go/src/github.com/jmorganca/ollama/cmd/cmd.go:660 +0x17cb github.com/jmorganca/ollama/cmd.RunGenerate(0x7fff9c765523?, {0xc0003df100, 0x1, 0x1?}) /go/src/github.com/jmorganca/ollama/cmd/cmd.go:389 +0xcf github.com/jmorganca/ollama/cmd.RunHandler(0xc0001d9c00?, {0xc0003df100?, 0x1, 0x1}) /go/src/github.com/jmorganca/ollama/cmd/cmd.go:145 +0x25c github.com/spf13/cobra.(*Command).execute(0xc0003a5800, {0xc0003df0d0, 0x1, 0x1}) /root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x87c github.com/spf13/cobra.(*Command).ExecuteC(0xc0003a4f00) /root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5 github.com/spf13/cobra.(*Command).Execute(...) /root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992 github.com/spf13/cobra.(*Command).ExecuteContext(...) /root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:985 main.main() /go/src/github.com/jmorganca/ollama/main.go:11 +0x4d ```
Author
Owner

@lstep commented on GitHub (Sep 27, 2023):

same for show system.
I checked, the model is correctly found as it answers (not correctly :-)):

ollama run codeup:13b-llama2-chat-q4_K_M
>>> I have three apples. I eat two pears. How many apples do I have left?
    
You have one apple left after eating two pears.
<!-- gh-comment-id:1736819885 --> @lstep commented on GitHub (Sep 27, 2023): same for `show system`. I checked, the model is correctly found as it answers (not correctly :-)): ``` ollama run codeup:13b-llama2-chat-q4_K_M >>> I have three apples. I eat two pears. How many apples do I have left? You have one apple left after eating two pears. ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#274