-
Notifications
You must be signed in to change notification settings - Fork 236
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
Race condition #459
Comments
I'm seeing this issue in version 0.6.0 : panic: runtime error: invalid memory address or nil pointer dereference goroutine 68477 [running]: |
I tested the previous release 0.5.2 and I'm also see similar issue : panic: runtime error: invalid memory address or nil pointer dereference goroutine 58783 [running]: |
FYI |
Thanks for your PR. It's merged now. Will do a new release with this fix. |
https://github.com/iamseth/oracledb_exporter/blame/29c8869cf60dc5b318236000f09fb69e92846620/collector/collector.go#L316
There is a race condition here, all the goroutines started using function f reference directly the err variable. When more than one change it at the same or close times, you get:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x9f2229]
goroutine 176881 [running]:
github.com/iamseth/oracledb_exporter/collector.(*Exporter).scrape.func2()
.../oracledb_exporter/collector/collector.go:316 +0x13e9
created by github.com/iamseth/oracledb_exporter/collector.(*Exporter).scrape in goroutine 176838
.../oracledb_exporter/collector/collector.go:322 +0x776
The text was updated successfully, but these errors were encountered: