sammcj/gollama

Bug: Segmentation violation when running on Ubuntu 22.04

Closed this issue · 4 comments

Describe the bug

I've tried using the pre-built release and building from source, but I receive the following error when running:

❯ ./gollama
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x545177]

goroutine 1 [running]:
net/url.(*URL).EscapedPath(0x0)
	/usr/local/go/src/net/url/url.go:705 +0x17
net/url.(*URL).JoinPath(0x0, {0xc00020dd58, 0x1, 0x8?})
	/usr/local/go/src/net/url/url.go:1201 +0x2f
github.com/ollama/ollama/api.(*Client).do(0xc00011c480, {0x8a3d68, 0xb7dc40}, {0x79cb06, 0x3}, {0x79ee2a?, 0x410305?}, {0x0?, 0x0?}, {0x721fa0, ...})
	/home/joelt/go/pkg/mod/github.com/ollama/ollama@v0.1.44/api/client.go:104 +0xe5
github.com/ollama/ollama/api.(*Client).List(0xc00011c480, {0x8a3d68, 0xb7dc40})
	/home/joelt/go/pkg/mod/github.com/ollama/ollama@v0.1.44/api/client.go:300 +0x85
main.main()
	/home/joelt/tools/gollama/main.go:112 +0x554

To Reproduce

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

image

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Gollama 1.11.1

Thanks for the bug report, I'll look into this!

@jralmaraz I wonder if it's related to recent logging/config changes, perhaps trying to access a log or config file that doesn't exist?

@joelclimbsthings could you please try updating gollama (e.g. go install github.com/sammcj/gollama@HEAD) and let me know if the problem is resolved?

@sammcj That worked! That's for the quick fix 🙇🏻

I did get a small error regarding parsing the Ollama URL from the config, but fixed it be replacing 0.0.0.0:11434 with http://0.0.0.0:11434. And the linking worked, thanks!

Ah great thanks for letting me know. I'll update the default config handler to make that a bit more reliable.