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

Config check results in panic #16399

Open
Hipska opened this issue Jan 14, 2025 · 0 comments
Open

Config check results in panic #16399

Hipska opened this issue Jan 14, 2025 · 0 comments
Labels
bug unexpected problem or unintended behavior

Comments

@Hipska
Copy link
Contributor

Hipska commented Jan 14, 2025

Relevant telegraf.conf

[[inputs.mem]]

Logs from Telegraf

2025-01-14T10:26:14Z I! Loading config: test.conf
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xcd9ed9]

System info

Telegraf 1.33.1 (git: HEAD@44f3a504)

Docker

No response

Steps to reproduce

Run telegraf config check --config test.conf.

Expected behavior

Telegraf validating or invalidating the config file.

Actual behavior

Panic when the file does not include this

[agent]
  skip_processors_after_aggregators = false

This blocks anyone who has this validation in their configuration management systems (Ansible, Puppet, Mgmt Config, …)

Additional info

goroutine 1 [running]:
github.com/influxdata/telegraf/agent.(*Agent).InitPlugins(0xc00228f518)
	/go/src/github.com/influxdata/telegraf/agent/agent.go:244 +0x3f9
main.getConfigCommands.func2(0xc001cef100)
	/go/src/github.com/influxdata/telegraf/cmd/telegraf/cmd_config.go:88 +0x258
github.com/urfave/cli/v2.(*Command).Run(0xc00282e420, 0xc001cef100, {0xc002811170, 0x3, 0x3})
	/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:276 +0x7e2
github.com/urfave/cli/v2.(*Command).Run(0xc00282e2c0, 0xc001ceed80, {0xc001ceedc0, 0x4, 0x4})
	/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0xa65
github.com/urfave/cli/v2.(*Command).Run(0xc00282fce0, 0xc001cee440, {0xc0001e2000, 0x5, 0x5})
	/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0xa65
github.com/urfave/cli/v2.(*App).RunContext(0xc000216000, {0xa9c9fe0, 0x11223cc0}, {0xc0001e2000, 0x5, 0x5})
	/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:333 +0x58b
github.com/urfave/cli/v2.(*App).Run(...)
	/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:307
main.runApp({0xc0001e2000, 0x5, 0x5}, {0xa923d00, 0xc0001ce020}, {0xa9582a0, 0xc00254d5d0}, {0xa9582c8, 0xc00282e160}, {0xa9c9e90, ...})
	/go/src/github.com/influxdata/telegraf/cmd/telegraf/main.go:395 +0x10d1
main.main()
	/go/src/github.com/influxdata/telegraf/cmd/telegraf/main.go:409 +0xe8
@Hipska Hipska added the bug unexpected problem or unintended behavior label Jan 14, 2025
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
Projects
None yet
Development

No branches or pull requests

1 participant