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

nil pointer dereference #118

Open
derrick-dacosta opened this issue Mar 3, 2025 · 0 comments
Open

nil pointer dereference #118

derrick-dacosta opened this issue Mar 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@derrick-dacosta
Copy link
Collaborator

Detailed Description

All redfish API scrape responses that result in an error should be handled properly. On some rare occasions this is not happening and it results in a nil pointer dereference.

Expected Behavior

application shouldn't try to dereference a nil pointer.

Current Behavior

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x8ff2aa]

goroutine 1168751194 [running]:
[[github.com/comcast/fishymetrics/common.BuildRequest](http://github.com/comcast/fishymetrics/common.BuildRequest)](http://github.com/comcast/fishymetrics/common.BuildRequest)({0xc003e29080, 0x296}, {0xc006e00ffd?, 0xc024936070?})
/go/src/github.com/comcast/fishymetrics/common/util.go:130 +0x10a
[[github.com/comcast/fishymetrics/exporter.NewExporter.Fetch.func8()](http://github.com/comcast/fishymetrics/exporter.NewExporter.Fetch.func8())](http://github.com/comcast/fishymetrics/exporter.NewExporter.Fetch.func8())
/go/src/github.com/comcast/fishymetrics/common/util.go:48 +0xe8
[[github.com/comcast/fishymetrics/pool.(*Task](http://github.com/comcast/fishymetrics/pool.(*Task)](http://github.com/comcast/fishymetrics/pool.(*Task)).Run(0xc00dadbe60, 0xc00fc918a8)
/go/src/github.com/comcast/fishymetrics/pool/task.go:69 +0x22
[[github.com/comcast/fishymetrics/pool.(*Pool](http://github.com/comcast/fishymetrics/pool.(*Pool)](http://github.com/comcast/fishymetrics/pool.(*Pool)).work(...)
/go/src/github.com/comcast/fishymetrics/pool/pool.go:86
created by [[github.com/comcast/fishymetrics/pool.(*Pool](http://github.com/comcast/fishymetrics/pool.(*Pool)](http://github.com/comcast/fishymetrics/pool.(*Pool)).Run in goroutine 1168751192
/go/src/github.com/comcast/fishymetrics/pool/pool.go:65 +0x25

Steps to Reproduce

Possible Implementation

@derrick-dacosta derrick-dacosta added the bug Something isn't working label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant