influxdata / influxdata/kapacitor
panic in combine
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
panic: runtime error: slice bounds out of range [:1] with capacity 0
goroutine 102 [running]:
github.com/influxdata/kapacitor.(*combineBuffer).addPoint(0xc0004778c0, 0x7fa066699138, 0xc0009dbe60, 0x7fa066699138, 0xc0009dbe60)
/root/go/src/github.com/influxdata/kapacitor/combine.go:129 +0x29e
github.com/influxdata/kapacitor.(*combineBuffer).BatchPoint(0xc0004778c0, 0x26cb6e0, 0xc0006bd830, 0x0, 0x0)
/root/go/src/github.com/influxdata/kapacitor/combine.go:99 +0xc7
github.com/influxdata/kapacitor/edge.(*groupedConsumer).BatchPoint(0xc00090e000, 0x26cb6e0, 0xc0006bd830, 0x26cb6e0, 0xc0006bd830)
/root/go/src/github.com/influxdata/kapacitor/edge/grouped.go:84 +0x51
github.com/influxdata/kapacitor/edge.(*consumer).Consume(0xc000922000, 0x0, 0x0)
/root/go/src/github.com/influxdata/kapacitor/edge/consumer.go:49 +0x1bb
github.com/influxdata/kapacitor/edge.(*groupedConsumer).Consume(0xc00090e000, 0x23c48ca, 0x13)
/root/go/src/github.com/influxdata/kapacitor/edge/grouped.go:51 +0x33
github.com/influxdata/kapacitor.(*CombineNode).runCombine(0xc0001ee140, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/src/github.com/influxdata/kapacitor/combine.go:53 +0x1bb
github.com/influxdata/kapacitor.(*node).start.func1(0xc0001ee140, 0x0, 0x0, 0x0)
/root/go/src/github.com/influxdata/kapacitor/node.go:186 +0x89
created by github.com/influxdata/kapacitor.(*node).start
/root/go/src/github.com/influxdata/kapacitor/node.go:164 +0x5d
Contributor guide
Research direction
Start at combine.go:129, where combineBuffer.addPoint panics, then trace the call from combine.go:99 through CombineNode.runCombine. Reproduce the reported slice-bounds failure and inspect the surrounding buffer handling. Done means the panic is prevented and a regression test covers the failing combine path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100