-
Notifications
You must be signed in to change notification settings - Fork 237
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: