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

Runtime error when there are no NVM devices. #2675

Closed
Creatone opened this issue Sep 21, 2020 · 0 comments · Fixed by #2676
Closed

Runtime error when there are no NVM devices. #2675

Creatone opened this issue Sep 21, 2020 · 0 comments · Fixed by #2676

Comments

@Creatone
Copy link
Collaborator

There is a runtime error when cAdvisor is built with libipmctl and there are no NVM devices.

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/google/cadvisor/nvm.getAvgPowerBudget(0x0, 0x0, 0x0) 
        /go/src/github.com/google/cadvisor/nvm/machine_libipmctl.go:63 +0x587
github.com/google/cadvisor/nvm.GetInfo(0x0, 0x0, 0x0, 0x0, 0x0) 
        /go/src/github.com/google/cadvisor/nvm/machine_libipmctl.go:110 +0x18d
github.com/google/cadvisor/machine.Info(0x1755780, 0x20f8158, 0x1748120, 0xc000446ff0, 0x1705601, 0xc000447050, 0x0, 0x1748120) 
        /go/src/github.com/google/cadvisor/machine/info.go:82 +0x1b2
github.com/google/cadvisor/manager.New(0xc000559780, 0x1755780, 0x20f8158, 0xc000236668, 0xc000236674, 0xc00040da70, 0xc00040dad0, 0xc00035a580, 0x1, 0x1, ...)
        /go/src/github.com/google/cadvisor/manager/manager.go:208 +0x4b6
main.main()
        /go/src/github.com/google/cadvisor/cmd/cadvisor.go:173 +0x306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant