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

SIGSEV when checking if a valid config is in fact valid #16481

Open
dmgeurts-mm opened this issue Feb 5, 2025 · 0 comments
Open

SIGSEV when checking if a valid config is in fact valid #16481

dmgeurts-mm opened this issue Feb 5, 2025 · 0 comments
Labels
bug unexpected problem or unintended behavior

Comments

@dmgeurts-mm
Copy link

Relevant telegraf.conf

n/a

Logs from Telegraf

$ sudo telegraf config check
2025-02-05T16:55:49Z I! Loading config: /etc/telegraf/telegraf.conf
2025-02-05T16:55:49Z W! DeprecationWarning: Value "false" for option "ignore_protocol_stats" of plugin "inputs.net" deprecated since version 1.27.3 and will be removed in 1.36.0: use the 'inputs.nstat' plugin instead for protocol stats
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xcd9ed9]

goroutine 1 [running]:
github.com/influxdata/telegraf/agent.(*Agent).InitPlugins(0xc00224d518)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:244 +0x3f9
main.getConfigCommands.func2(0xc0020822c0)
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/cmd_config.go:88 +0x258
github.com/urfave/cli/v2.(*Command).Run(0xc00274c840, 0xc0020822c0, {0xc0027a2cd0, 0x1, 0x1})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:276 +0x7e2
github.com/urfave/cli/v2.(*Command).Run(0xc00274c6e0, 0xc001f53640, {0xc0022fcbc0, 0x2, 0x2})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0xa65
github.com/urfave/cli/v2.(*Command).Run(0xc0027962c0, 0xc001e00200, {0xc0000b4ea0, 0x3, 0x3})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0xa65
github.com/urfave/cli/v2.(*App).RunContext(0xc00004d400, {0xa9c9fe0, 0x11223cc0}, {0xc0000b4ea0, 0x3, 0x3})
        /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({0xc0000b4ea0, 0x3, 0x3}, {0xa923d00, 0xc0000e6028}, {0xa9582a0, 0xc000236b50}, {0xa9582c8, 0xc00274c580}, {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

System info

Ubuntu 22.04

Docker

n/a

Steps to reproduce

  1. Install telegraf
  2. Run it successfully
  3. Test if the config is okay: sudo telegraf config check
    ...

Expected behavior

No SIGSEV error when checking a configuration file is valid.

Actual behavior

SIGSEV error as shown

Additional info

Telegraf 1.33.1 (git: HEAD@44f3a504)

@dmgeurts-mm dmgeurts-mm added the bug unexpected problem or unintended behavior label Feb 5, 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