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

promql.Engine calls At() after Next() returns false #2944

Closed
tomwilkie opened this Issue Jul 13, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@tomwilkie
Copy link
Member

tomwilkie commented Jul 13, 2017

This is whilst testing #2850:

INFO[0999] mergeIterator.Next                            source="fanout.go:378"
INFO[0999] mergeIterator.Next true                       source="fanout.go:385"
INFO[0999] mergeIterator.Seek t=1499952745180            source="fanout.go:361"
INFO[0999] mergeIterator.Seek true                       source="fanout.go:368"
INFO[0999] mergeIterator.Next                            source="fanout.go:378"
INFO[0999] mergeIterator.Next true                       source="fanout.go:399"
INFO[0999] mergeIterator.Next                            source="fanout.go:378"
INFO[0999] mergeIterator.Next true                       source="fanout.go:399"
INFO[0999] mergeIterator.Next                            source="fanout.go:378"
INFO[0999] mergeIterator.Next true                       source="fanout.go:399"
INFO[0999] mergeIterator.Next                            source="fanout.go:378"
INFO[0999] mergeIterator.Next false                      source="fanout.go:399"
ERRO[0999] parser panic: runtime error: index out of range
goroutine 9853 [running]:
github.com/prometheus/prometheus/promql.(*evaluator).recover(0xc421daad00, 0xc421ded120)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:587 +0xd5
panic(0x25b2480, 0x353b0a0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/panic.go:489 +0x2cf
github.com/prometheus/prometheus/storage.(*mergeIterator).At(0xc421db0e70, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/storage/fanout.go:374 +0x65
github.com/prometheus/prometheus/storage.(*BufferedSeriesIterator).Values(0xc421db0ea0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/storage/buffer.go:101 +0x33
github.com/prometheus/prometheus/promql.(*evaluator).matrixSelector(0xc421daad00, 0xc4205779d0, 0x284c0e6, 0x15, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:854 +0x393
github.com/prometheus/prometheus/promql.(*evaluator).eval(0xc421daad00, 0x348b3c0, 0xc4205779d0, 0xc421ded120, 0xc421daad00)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:715 +0x5cb
github.com/prometheus/prometheus/promql.(*evaluator).Eval(0xc421daad00, 0x348b3c0, 0xc4205779d0, 0x0, 0x0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:666 +0xd3
github.com/prometheus/prometheus/promql.(*Engine).execEvalStmt(0xc420776b70, 0x5102298, 0xc421da9260, 0xc421daaa40, 0xc420f3f630, 0x0, 0x0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:384 +0x1617
github.com/prometheus/prometheus/promql.(*Engine).exec(0xc420776b70, 0x5102298, 0xc421da9260, 0xc421daaa40, 0x0, 0x0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:340 +0x3a0
github.com/prometheus/prometheus/promql.(*query).Exec(0xc421daaa40, 0x3bc4d58, 0xc421daa940, 0x3bc4d58)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/promql/engine.go:178 +0x9e
github.com/prometheus/prometheus/web/api/v1.(*API).query(0xc4200740c0, 0xc420830300, 0x0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/web/api/v1/api.go:190 +0x32e
github.com/prometheus/prometheus/web/api/v1.(*API).(github.com/prometheus/prometheus/web/api/v1.query)-fm(0xc420830300, 0xc421db22e0, 0xc420f3f5e0, 0x3)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/web/api/v1/api.go:140 +0x34
github.com/prometheus/prometheus/web/api/v1.(*API).Register.func1.1(0x348b780, 0xc421db22e0, 0xc420830300)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/web/api/v1/api.go:125 +0x55
net/http.HandlerFunc.ServeHTTP(0xc4204a8810, 0x348b780, 0xc421db22e0, 0xc420830300)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:1942 +0x44
github.com/prometheus/prometheus/util/httputil.CompressionHandler.ServeHTTP(0x3484140, 0xc4204a8810, 0x348c8c0, 0xc420f3f5e0, 0xc420830300)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/util/httputil/compression.go:90 +0x7c
github.com/prometheus/prometheus/util/httputil.(*CompressionHandler).ServeHTTP(0xc4204a8820, 0x348c8c0, 0xc420f3f5e0, 0xc420830300)
	<autogenerated>:5 +0x74
net/http.(Handler).ServeHTTP-fm(0x348c8c0, 0xc420f3f5e0, 0xc420830300)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/prometheus/client_golang/prometheus/http.go:182 +0x4d
github.com/prometheus/prometheus/vendor/github.com/prometheus/client_golang/prometheus.InstrumentHandlerFuncWithOpts.func1(0x348c800, 0xc421db22c0, 0xc420830300)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/prometheus/client_golang/prometheus/http.go:309 +0x224
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/route.(*Router).handle.func1(0x348c800, 0xc421db22c0, 0xc420830200, 0x0, 0x0, 0x0)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/prometheus/common/route/route.go:50 +0x26a
github.com/prometheus/prometheus/vendor/github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc42022e500, 0x348c800, 0xc421db22c0, 0xc420830200)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/julienschmidt/httprouter/router.go:299 +0x75d
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/route.(*Router).ServeHTTP(0xc4204a71e0, 0x348c800, 0xc421db22c0, 0xc420830200)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/prometheus/common/route/route.go:88 +0x4c
net/http.StripPrefix.func1(0x348c800, 0xc421db22c0, 0xc420830200)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:1977 +0xcf
net/http.HandlerFunc.ServeHTTP(0xc420b37f20, 0x348c800, 0xc421db22c0, 0xc420830200)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:1942 +0x44
net/http.(*ServeMux).ServeHTTP(0xc4204a47e0, 0x348c800, 0xc421db22c0, 0xc420830200)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:2238 +0x130
github.com/prometheus/prometheus/vendor/github.com/opentracing-contrib/go-stdlib/nethttp.Middleware.func2(0x3493f40, 0xc4201607e0, 0xc420830100)
	/Users/twilkie/Documents/src/github.com/prometheus/prometheus/vendor/github.com/opentracing-contrib/go-stdlib/nethttp/server.go:74 +0x45a
net/http.HandlerFunc.ServeHTTP(0xc420b37f80, 0x3493f40, 0xc4201607e0, 0xc420830100)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:1942 +0x44
net/http.serverHandler.ServeHTTP(0xc4203b82c0, 0x3493f40, 0xc4201607e0, 0xc420830100)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420c7a960, 0x3495a40, 0xc421a76a00)
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/Cellar/go/1.8.3/libexec/src/net/http/server.go:2668 +0x2ce
  source="engine.go:589"
@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Aug 1, 2017

Fixed via #2946

@fabxc fabxc closed this Aug 1, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.