hashicorp/damon

Seg fault running Damon

ddaws opened this issue · 1 comments

ddaws commented

I am getting a seg fault after running damon for ~10 seconds. The seg fault breaks the current terminal session and breaks formatting. I have copied the error below and tried to format it to make is a bit more readable.

panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6f9abe]
    goroutine 37 [running]:
      github.com/hcjulz/damon/nomad.getTasksFromAlloc(0xc0001901e8?, 0xc000a97e60?)
      /home/.../damon/nomad/alloc.go:61 +0x1be
      github.com/hcjulz/damon/nomad.(*Nomad).toAllocs(0xc000220180, {0xc000ac8000, 0x43, 0xc0002749f0?})
      /home/.../damon/nomad/alloc.go:87 +0x12b
      github.com/hcjulz/damon/nomad.(*Nomad).Allocations(0xc000220180, 0xc0000a4f60?)
      /home/.../damon/nomad/alloc.go:47 +0xc8
      github.com/hcjulz/damon/watcher.(*Watcher).updateAllocations(0xc0000a6550)
      /home/.../damon/watcher/watcher.go:185 +0x57
      github.com/hcjulz/damon/watcher.(*Watcher).update(0x75d460?, {0x7c5971, 0xa})
      /home/.../damon/watcher/watcher.go:156 +0x72
      github.com/hcjulz/damon/watcher.(*Watcher).Watch(0xc0000a6550)
      /home/.../damon/watcher/watcher.go:130 +0x1d7
      created by main.main
      /home/.../tools/damon/cmd/damon/main.go:100 +0xeb6

I compiled Damon using Go 1.19

$ go version
go version go1.19 linux/amd64

👋 @ddaws Thank you for opening this issue. This got addressed with #47

If you still encounter this issue feel free to re-open this issue.