influxdata / influxdata/kapacitor

Crash on publish to alert topics

Open
#1,786 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Operating System: Ubuntu 14.04
Kapacitor Version: 1.4.0

I have an alert that fires correctly normally, however when I publish it to a topic and then to a topic handler:

```
topic: medicare
id: medicare
kind: publish
options:
topics:
- medicare_prod
- medicare_stage
- medicare_qa
```
Which then representatively goes to each of these topic handlers (example below of one:)
```
{
"topic": "medicare_qa",
"kind": "pagerDuty",
"id": "medicare_qa",
"match": "\"instance\" == 'url.mysite.com'",
"options": {
"serviceKey": "servicekeyservicekeyservicekey"
}
}
```

I get the following exception and kapacitor crashes:

panic: runtime error: invalid memory address or nil pointer dereference
kapacitor_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x19ffa7b]
kapacitor_1 |
kapacitor_1 | goroutine 144 [running]:
kapacitor_1 | github.com/influxdata/kapacitor/services/alert.(*matchHandler).Handle(0xc4204ae8a0, 0xc420b8f2f0, 0xb, 0xc4207f16a0, 0x1b, 0xc420868280, 0x36, 0xc4207a3c00, 0x31d, 0x0, ...)
kapacitor_1 | /root/go/src/github.com/influxdata/kapacitor/services/alert/handlers.go:446 +0xab
kapacitor_1 | github.com/influxdata/kapacitor/alert.(*bufHandler).run(0xc4208d9dd0)
kapacitor_1 | /root/go/src/github.com/influxdata/kapacitor/alert/topics.go:440 +0x7d
kapacitor_1 | github.com/influxdata/kapacitor/alert.newHandler.func1(0xc4208d9dd0)
kapacitor_1 | /root/go/src/github.com/influxdata/kapacitor/alert/topics.go:397 +0x57
kapacitor_1 | created by github.com/influxdata/kapacitor/alert.newHandler
kapacitor_1 | /root/go/src/github.com/influxdata/kapacitor/alert/topics.go:395 +0x102

Any ideas?

Contributor guide

Open the contributing guide

Research direction

Reproduce the publish-to-topic-handler alert using the configuration in the issue. Start at services/alert/handlers.go:446, then inspect alert/topics.go:440 and the surrounding handler setup. Done means the alert is delivered to the configured topic handlers without a nil-pointer panic or Kapacitor crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.