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

telegraf crashes in LoadDirectory #2466

Closed
write0nly opened this issue Feb 23, 2017 · 2 comments · Fixed by #2467
Closed

telegraf crashes in LoadDirectory #2466

write0nly opened this issue Feb 23, 2017 · 2 comments · Fixed by #2467
Assignees
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Milestone

Comments

@write0nly
Copy link

Bug report

System info:

RHEL6 using the rpm below from your download page

# rpm -q telegraf
telegraf-1.2.1-1.x86_64

Steps to reproduce:

  1. create /etc/telegraf/telegraf.conf.d with mode 0644
  2. start telegraf

Expected behavior:

telegraf to error saying that /etc/telegraf/telegraf.conf.d is not browsable

Actual behavior:

telegraf crashes in config.LoadDirectory

goroutine 1 [running]:
panic(0xf2b720, 0xc4200120a0)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/influxdata/telegraf/internal/config.(*Config).LoadDirectory.func1(0xc420015860, 0x23, 0x0, 0x0, 0x18ec040, 0xc4200158c0, 0x0, 0x0)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/internal/config/config.go:509 +0x2f
path/filepath.walk(0x7fffc320cddd, 0x18, 0x18fd6a0, 0xc420092270, 0xc42012f630, 0x0, 0xf22d01)
	/usr/local/go/src/path/filepath/path.go:372 +0x22e
path/filepath.Walk(0x7fffc320cddd, 0x18, 0xc42012f630, 0x7000105, 0x0)
	/usr/local/go/src/path/filepath/path.go:398 +0xd5
github.com/influxdata/telegraf/internal/config.(*Config).LoadDirectory(0xc4202c05a0, 0x7fffc320cddd, 0x18, 0x0, 0x0)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/internal/config/config.go:522 +0x79
main.reloadLoop(0xc4200881e0, 0x0, 0x0)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:211 +0x732
main.main()
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:342 +0x85
@sparrc sparrc added bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf labels Feb 23, 2017
@sparrc sparrc added this to the 1.3.0 milestone Feb 23, 2017
@sparrc
Copy link
Contributor

sparrc commented Feb 23, 2017

strange that mode 0644 would cause a panic, are there files in the directory that are 0600?

@write0nly
Copy link
Author

I had files with mode 0644 inside it. ... Not sure, if you want i can create a more detailed reproducer.

sparrc added a commit that referenced this issue Feb 28, 2017
ssorathia pushed a commit to ssorathia/telegraf that referenced this issue Mar 25, 2017
vlamug pushed a commit to vlamug/telegraf that referenced this issue May 30, 2017
maxunt pushed a commit that referenced this issue Jun 26, 2018
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