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

Fix Statsd input panic when processing DataDog events #6121

Merged

Conversation

CriGoT
Copy link
Contributor

@CriGoT CriGoT commented Jul 15, 2019

Fixes the folllowing panic that is caused by sending a Datadog event to the StatsD input

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1747ff7]

goroutine 12 [running]:
github.com/influxdata/telegraf/plugins/inputs/statsd.(*Statsd).parseEventMessage(0xc0001b8380, 0xbf434fd5f15bd546, 0xd7be3d60, 0x4554680, 0xc000286380, 0x3a, 0xc00
04b8060, 0x9, 0x1, 0x0)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/statsd/datadog.go:136 +0x10a7
github.com/influxdata/telegraf/plugins/inputs/statsd.(*Statsd).parser(0xc0001b8380, 0x2695778, 0xc0001b8408)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/statsd/statsd.go:502 +0x2fd
github.com/influxdata/telegraf/plugins/inputs/statsd.(*Statsd).Start.func4(0xc0001b8380)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/statsd/statsd.go:401 +0x5a
created by github.com/influxdata/telegraf/plugins/inputs/statsd.(*Statsd).Start
        /go/src/github.com/influxdata/telegraf/plugins/inputs/statsd/statsd.go:399 +0x9a7

The PR adds the initialization of the accumulator used by the parseEventMessage function

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added this to the 1.11.3 milestone Jul 15, 2019
@danielnelson danielnelson added the fix pr to fix corresponding bug label Jul 15, 2019
@danielnelson danielnelson merged commit b15fe4a into influxdata:master Jul 16, 2019
@danielnelson
Copy link
Contributor

Thank you

danielnelson pushed a commit that referenced this pull request Jul 16, 2019
bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants