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

Handle nil MeasurementIterator. #8893

Merged

Conversation

benbjohnson
Copy link
Contributor

@benbjohnson benbjohnson commented Sep 28, 2017

@jwilder This should fix the panic you reported along with some additional checks elsewhere.

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

goroutine 45102 [running]:
github.com/influxdata/influxdb/tsdb/index/tsi1.(*FileSet).MeasurementNamesByExpr(0xc4206ea910, 0x0, 0x0, 0x0, 0xc420a99ce0, 0x42b40f, 0xd143c8, 0xc420a99cf0)
    /root/go/src/github.com/influxdata/influxdb/tsdb/index/tsi1/file_set.go:528 +0x65
github.com/influxdata/influxdb/tsdb/index/tsi1.(*Index).MeasurementNamesByExpr(0xc420a7e1e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /root/go/src/github.com/influxdata/influxdb/tsdb/index/tsi1/index.go:405 +0xb2
github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Engine).MeasurementNamesByExpr(0xc4200aac60, 0x0, 0x0, 0x0, 0x0, 0xc420a99e68, 0x0, 0xffffffffffffffff)
    /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:331 +0x52
github.com/influxdata/influxdb/tsdb.(*Shard).MeasurementNamesByExpr(0xc4206861a0, 0x0, 0x0, 0xc420a99e68, 0xc420a99e38, 0xc4207aaf20, 0x0, 0x1)
    /root/go/src/github.com/influxdata/influxdb/tsdb/shard.go:745 +0x9e
github.com/influxdata/influxdb/tsdb.(*Store).MeasurementNames(0xc4205e5b80, 0xcbde71, 0x3, 0x0, 0x0, 0xc4207aaf20, 0x1, 0x1, 0x0, 0xc420a99f88)
    /root/go/src/github.com/influxdata/influxdb/tsdb/store.go:976 +0x18e
github.com/influxdata/influxdb/tests.TestConcurrentServer_ShowMeasurements.func2()
    /root/go/src/github.com/influxdata/influxdb/tests/server_concurrent_test.go:123 +0x9b
github.com/influxdata/influxdb/tests.runTest.func2(0xc42012f110, 0xc420bc49c0, 0xc4203710e0)
    /root/go/src/github.com/influxdata/influxdb/tests/server_concurrent_test.go:150 +0x7d
created by github.com/influxdata/influxdb/tests.runTest
    /root/go/src/github.com/influxdata/influxdb/tests/server_concurrent_test.go:153 +0xf5
Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

@ghost ghost assigned benbjohnson Sep 28, 2017
@ghost ghost added the review label Sep 28, 2017
@jwilder jwilder added this to the 1.4.0 milestone Oct 24, 2017
@benbjohnson benbjohnson force-pushed the handle-nil-measurement-iterator branch from 250d9ce to 49c1fca Compare October 26, 2017 17:25
@benbjohnson benbjohnson merged commit da46ac5 into influxdata:master Oct 26, 2017
@ghost ghost removed the review label Oct 26, 2017
@benbjohnson benbjohnson deleted the handle-nil-measurement-iterator branch October 26, 2017 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants