Open stuartcarnie opened 2 years ago
I have the same error with InfluxDB OSS 1.8.10 running on Ubuntu 20.04.
@stuartcarnie another report of this error has surfaced in 1.8.10:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x963de0] goroutine 3552892630 [running]: [github.com/influxdata/influxdb/query.Iterators.Close](https://github.com/influxdata/influxdb/query.Iterators.Close)(0xc255237e90, 0x2, 0x3, 0xc25502f5e0, 0x25b6fe0) /go/src/[github.com/influxdata/influxdb/query/iterator.go:48](https://github.com/influxdata/influxdb/query/iterator.go:48) +0x50
See the same with InfluxDB OSS 1.8.10 in docker:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x963de0]
goroutine 1211408 [running]:
[github.com/influxdata/influxdb/query.Iterators.Close(0xc177f9c000](http://github.com/influxdata/influxdb/query.Iterators.Close(0xc177f9c000), 0x7a, 0x171, 0xc177cf6190, 0x25b6fe0)
/go/src/github.com/influxdata/influxdb/query/iterator.go:48 +0x50
This seems to be a duplicate of #21649
InfluxDB: OSS 1.8.9
A community member has reported an error when executing queries that contain regular expressions and has provided the following call stack:
The
nil
pointer dereference occurs here:https://github.com/influxdata/influxdb/blob/d9b56321d5796d7791138ed6a8f0a6ae6007a551/query/iterator.go#L48
as a result of an error being raised here:
https://github.com/influxdata/influxdb/blob/d9b56321d5796d7791138ed6a8f0a6ae6007a551/coordinator/shard_mapper.go#L188-L204
suggesting that prior to the error occurring, a
nil
iterator was added to theinputs
slice:https://github.com/influxdata/influxdb/blob/d9b56321d5796d7791138ed6a8f0a6ae6007a551/coordinator/shard_mapper.go#L194
It appears that calling
filterNonNil
is a common pattern for eliminatingnil
iterators, prior to performing subsequent operations:https://github.com/influxdata/influxdb/blob/d9b56321d5796d7791138ed6a8f0a6ae6007a551/query/iterator.go#L53-L54