-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Sometimes got "panic: runtime error: invalid memory address or nil pointer dereference" #21065
Comments
If there is an error in creating an Iterator, the input return by sg.CreateIterator(ctx, mm, opt) will be nil. however, when close the Iterator, There is no operation to check the status, so there is a panic for close() for more detail, please read this PR :) |
Maybe related to this issue - adding the two recent panic samples from another environment:
|
i think this solution would be fine |
we are guiding community users to InfluxDB 2.1 -- this issue is resolved there. If you run into issues upgrading, please let us know. |
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
Expected behavior:
show tag values CARDINALITY
Actual behavior:
influxdb process got crashed
Environment info:
uname -a
Linux ip-10-15-29-164.ap-southeast-1.compute.internal 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
influxdb version: 1.8.2
Logs:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x92e790]
goroutine 306157422 [running]:
github.com/influxdata/influxdb/query.Iterators.Close(0xc1065da000, 0x28, 0x161, 0xc0f8196aa0, 0x255ac00)
/go/src/github.com/influxdata/influxdb/query/iterator.go:48 +0x50
github.com/influxdata/influxdb/coordinator.(*LocalShardMapping).CreateIterator(0xc3e9a9e040, 0x25490a0, 0xc22597a420, 0xc0f8196aa0, 0x253e320, 0xc1e0a19840, 0x0, 0x0, 0x0, 0x0, ...)
/go/src/github.com/influxdata/influxdb/coordinator/shard_mapper.go:202 +0x33a
github.com/influxdata/influxdb/query.(*exprIteratorBuilder).buildVarRefIterator.func1(0xc0fe6e4ab8, 0x25490a0, 0xc22597a420, 0xc0fe6e4940, 0xc1e0a19840, 0x10000c2ccd697f8, 0x0)
/go/src/github.com/influxdata/influxdb/query/select.go:176 +0x15c
github.com/influxdata/influxdb/query.(*exprIteratorBuilder).buildVarRefIterator(0xc0fe6e4ab8, 0x25490a0, 0xc22597a420, 0xc1e0a19840, 0x0, 0x0, 0x0, 0x0) /go/src/github.com/influxdata/influxdb/query/select.go:196 +0xd2
github.com/influxdata/influxdb/query.buildExprIterator(0x25490a0, 0xc22597a420, 0x253e320, 0xc1e0a19840, 0x7daa7d156688, 0xc3e9a9e040, 0xc04a754840, 0x1, 0x1, 0x253e320, ...) /go/src/github.com/influxdata/influxdb/query/select.go:154 +0x27dgithub.com/influxdata/influxdb/query.(*exprIteratorBuilder).buildCallIterator(0xc003447a80, 0x25490a0, 0xc22597a420, 0xc22597a540, 0x20303900000000, 0x7ef89656afff,0x7ef78000a790, 0x60010000000000) /go/src/github.com/influxdata/influxdb/query/select.go:222 +0x2c47
github.com/influxdata/influxdb/query.buildExprIterator(0x25490a0, 0xc22597a420, 0x253dfe0, 0xc22597a540, 0x7daa7d156688, 0xc3e9a9e040, 0xc04a754840, 0x1, 0x1, 0x253dfe0, ...) /go/src/github.com/influxdata/influxdb/query/select.go:156 +0x1f4github.com/influxdata/influxdb/query.(*exprIteratorBuilder).buildCallIterator.func1(0xc22597a570, 0x25490a0, 0xc22597a420, 0xc0034498f0, 0xc0fe6e6dd0, 0x0, 0x0, 0x0, 0x0) /go/src/github.com/influxdata/influxdb/query/select.go:506 +0x5f4
github.com/influxdata/influxdb/query.(*exprIteratorBuilder).buildCallIterator(0xc0fe6e78f0, 0x25490a0, 0xc22597a420, 0xc22597a570, 0xc1050e28f0, 0x904368, 0xc0e7ac6a00, 0x0) /go/src/github.com/influxdata/influxdb/query/select.go:559 +0xd3egithub.com/influxdata/influxdb/query.buildExprIterator(0x25490a0, 0xc22597a420, 0x253dfe0, 0xc22597a570, 0x7daa7d156688, 0xc3e9a9e040, 0xc04a754840, 0x1, 0x1, 0x253dfe0, ...) /go/src/github.com/influxdata/influxdb/query/select.go:156 +0x1f4github.com/influxdata/influxdb/query.buildFieldIterator(0x25490a0, 0xc22597a420, 0x253dfe0, 0xc22597a570, 0x7daa7d156688, 0xc3e9a9e040, 0xc04a754840, 0x1, 0x1, 0x0,...) /go/src/github.com/influxdata/influxdb/query/select.go:870 +0x489
github.com/influxdata/influxdb/query.buildCursor.func1(0xc10980cf68, 0x0) /go/src/github.com/influxdata/influxdb/query/select.go:744 +0x127
github.com/influxdata/influxdb/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1(0xc22597a5a0, 0xc18dec7d50)
/go/src/github.com/influxdata/influxdb/vendor/golang.org/x/sync/errgroup/errgroup.go:57 +0x64
created by github.com/influxdata/influxdb/vendor/golang.org/x/sync/errgroup.(*Group).Go
/go/src/github.com/influxdata/influxdb/vendor/golang.org/x/sync/errgroup/errgroup.go:54 +0x66
The text was updated successfully, but these errors were encountered: