Skip to content

Multiple SIGHUPs in short succession causes a panic #5879

@tommoa

Description

@tommoa

Relevant telegraf.conf:

Default configuration from ./telegraf config --output-filter file as well as

# Telegraf Configuration
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  hostname = ""
  omit_hostname = false

[[outputs.file]]
   files = ["stdout"]
   data_format = "influx"
[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false
[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]

System info:

Linux kernel: 5.0.11-arch1-1-ARCH
Telegraf version: Telegraf unknown (git: master e6dd8536)

Steps to reproduce:

  1. Start telegraf
  2. Run while [ true ]; do kill -s SIGHUP $(pidof telegraf); done

Expected behavior:

Configuration reloads on a loop.

Actual behavior:

E! [telegraf] Error running agent: context canceled

Additional info:

This bug actually doesn't occur if the config being used is small enough; I can reproduce this using the default generated config however if I remove all of the commented lines from that config (as per the configuration above), then the error never occurs.

Metadata

Metadata

Assignees

Labels

area/agentbugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions