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

Panic during shutdown of multiple aggregators #5637

Closed
KevinJoiner opened this issue Mar 26, 2019 · 2 comments · Fixed by #5644
Closed

Panic during shutdown of multiple aggregators #5637

KevinJoiner opened this issue Mar 26, 2019 · 2 comments · Fixed by #5644
Assignees
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Milestone

Comments

@KevinJoiner
Copy link

Relevant telegraf.conf:

[[outputs.file]]
        files = ["stdout"]
[[inputs.exec]]
        commands = ["python -c print(5)"]
        interval = "1s"
        data_format = "value"
        data_type = "integer"
[[aggregators.valuecounter]]
        drop_original = false
        period = "5s"
        fields = ["value"]
[[aggregators.valuecounter]]
        drop_original = false
        period = "5s"
        fields = ["value"]

System info:

Telegraf 1.9.1
OS: RHEL 7.6

Steps to reproduce:

  1. Run Telegraf with two or more aggregator plugins.
  2. Stop Telegraf with kill -SIGTERM <PID> or keyboard interrupt

Expected behavior:

Telegraf gracefully stops

Actual behavior:

"panic: send on closed channel"

@glinton
Copy link
Contributor

glinton commented Mar 26, 2019

Can you include the full stack trace from the panic, please?

@KevinJoiner
Copy link
Author

panic: send on closed channel

goroutine 25 [running]:
github.com/influxdata/telegraf/agent.(*accumulator).addFields(0xc000167580, 0xc0001814d0, 0x4, 0xc000423740, 0xc000423d40, 0x3, 0x0, 0x0, 0x0)
        /go/src/github.com/influxdata/telegraf/agent/accumulator.go:102 +0x16f
github.com/influxdata/telegraf/agent.(*accumulator).AddFields(0xc000167580, 0xc0001814d0, 0x4, 0xc000423d40, 0xc000423740, 0x0, 0x0, 0x0)
        /go/src/github.com/influxdata/telegraf/agent/accumulator.go:45 +0x83
github.com/influxdata/telegraf/plugins/aggregators/valuecounter.(*ValueCounter).Push(0xc000166ae0, 0x25218c0, 0xc000167580)
        /go/src/github.com/influxdata/telegraf/plugins/aggregators/valuecounter/valuecounter.go:95 +0x1a8
github.com/influxdata/telegraf/internal/models.(*RunningAggregator).push(0xc000236000, 0x25218c0, 0xc000167580)
        /go/src/github.com/influxdata/telegraf/internal/models/running_aggregator.go:146 +0x6e
github.com/influxdata/telegraf/internal/models.(*RunningAggregator).Push(0xc000236000, 0x25218c0, 0xc000167580)
        /go/src/github.com/influxdata/telegraf/internal/models/running_aggregator.go:140 +0x11f
github.com/influxdata/telegraf/agent.(*Agent).push(0xc00000e288, 0x2513c20, 0xc0002e41c0, 0xc000236000, 0x25218c0, 0xc000167580)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:427 +0x177
github.com/influxdata/telegraf/agent.(*Agent).runAggregators.func2(0xc00023e020, 0xc00000e288, 0x2513c20, 0xc0002e41c0, 0xbf1ef62147dfc4ab, 0x3880f03, 0x3ce6540, 0x2540be400, 0xc00007db60, 0x0, ...)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:395 +0x157
created by github.com/influxdata/telegraf/agent.(*Agent).runAggregators
        /go/src/github.com/influxdata/telegraf/agent/agent.go:379 +0x239

@danielnelson danielnelson self-assigned this Mar 27, 2019
@danielnelson danielnelson added bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf and removed need more info labels Mar 27, 2019
@danielnelson danielnelson added this to the 1.10.2 milestone Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants