Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer dereference #122

Closed
qed- opened this issue Sep 18, 2015 · 1 comment
Closed

Null pointer dereference #122

qed- opened this issue Sep 18, 2015 · 1 comment

Comments

@qed-
Copy link

qed- commented Sep 18, 2015

I received the following panic, not doing anything in particular, there were two active alerts at the time, one silenced. Let me know if there's any further information I can provide.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4e532d]

goroutine 15 [running]:
github.com/prometheus/alertmanager/manager.(*memoryAlertManager).removeExpiredAggregates(0xc208054280)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/manager/manager.go:282 +0x23d
github.com/prometheus/alertmanager/manager.(*memoryAlertManager).runIteration(0xc208054280)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/manager/manager.go:395 +0x33
github.com/prometheus/alertmanager/manager.(*memoryAlertManager).Run(0xc208054280)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/manager/manager.go:408 +0x9a
created by main.main
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:111 +0xd50

goroutine 1 [chan receive, 15 minutes]:
github.com/prometheus/alertmanager/manager.(*notifier).Dispatch(0xc2080fc420)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/manager/notifier.go:813 +0x54
main.main()
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:157 +0x15c0

goroutine 14 [chan receive]:
main.func·001()
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:85 +0x84
created by main.main
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:90 +0x659

goroutine 16 [IO wait, 3 minutes]:
net.(*pollDesc).Wait(0xc208108fb0, 0x72, 0x0, 0x0)
        /usr/lib/golang/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208108fb0, 0x0, 0x0)
        /usr/lib/golang/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc208108f50, 0x0, 0x7fb150e92e40, 0xc208276768)
        /usr/lib/golang/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20802e5b0, 0x63ab5e, 0x0, 0x0)
        /usr/lib/golang/src/net/tcpsock_posix.go:234 +0x4e
net/http.tcpKeepAliveListener.Accept(0xc20802e5b0, 0x0, 0x0, 0x0, 0x0)
        /usr/lib/golang/src/net/http/server.go:1976 +0x4c
net/http.(*Server).Serve(0xc208032a20, 0x7fb150e95528, 0xc20802e5b0, 0x0, 0x0)
        /usr/lib/golang/src/net/http/server.go:1728 +0x92
net/http.(*Server).ListenAndServe(0xc208032a20, 0x0, 0x0)
        /usr/lib/golang/src/net/http/server.go:1718 +0x154
net/http.ListenAndServe(0x904bd0, 0x5, 0x0, 0x0, 0x0, 0x0)
        /usr/lib/golang/src/net/http/server.go:1808 +0xba
github.com/prometheus/alertmanager/web.WebService.ServeForever(0xc2080fd050, 0xc2080fd080, 0xc20808c640, 0xc208030c30, 0x904bd0, 0x5, 0x9041d0, 0x1, 0x0, 0x0)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/web/web.go:78 +0x8e6
created by main.main
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:145 +0x12f1

goroutine 17 [select, 15 minutes]:
github.com/prometheus/alertmanager/config.(*fileWatcher).Watch(0xc2080aa430, 0xc2080fd0b0)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/github.com/prometheus/alertmanager/config/watcher.go:49 +0x8fb
created by main.main
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/main.go:154 +0x14b0

goroutine 19 [syscall, 15 minutes]:
syscall.Syscall(0x0, 0x3, 0xc20816fee0, 0x10000, 0x0, 0x850f70, 0x7fb150e95560)
        /usr/lib/golang/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.read(0x3, 0xc20816fee0, 0x10000, 0x10000, 0x0, 0x0, 0x0)
        /usr/lib/golang/src/syscall/zsyscall_linux_amd64.go:867 +0x6e
syscall.Read(0x3, 0xc20816fee0, 0x10000, 0x10000, 0xffffffffffffffff, 0x0, 0x0)
        /usr/lib/golang/src/syscall/syscall_unix.go:136 +0x58
gopkg.in/fsnotify%2ev0.(*Watcher).readEvents(0xc2080325a0)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/gopkg.in/fsnotify.v0/fsnotify_linux.go:219 +0x12c
created by gopkg.in/fsnotify%2ev0.NewWatcher
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/gopkg.in/fsnotify.v0/fsnotify_linux.go:126 +0x420

goroutine 20 [chan receive, 15 minutes]:
gopkg.in/fsnotify%2ev0.(*Watcher).purgeEvents(0xc2080325a0)
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/gopkg.in/fsnotify.v0/fsnotify.go:21 +0x55
created by gopkg.in/fsnotify%2ev0.NewWatcher
        /home/mavdev/dave/prometheus/alertmanager/alertmanager/.build/gopath/src/gopkg.in/fsnotify.v0/fsnotify_linux.go:127 +0x43a
@juliusv
Copy link
Member

juliusv commented Sep 18, 2015

@qed- Thanks! Yep, known bug unfortunately in the experimental Alertmanager version, but it should only happen if you have alerts which are not matched by any aggregation_rule.

See also: #82 (comment)

Basically, make sure that every incoming alert has a matching aggregation_rule, and you should be fine. In case you do, and that still happened, it would be interesting to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants