promql-engine icon indicating copy to clipboard operation
promql-engine copied to clipboard

Panic with index out of range

Open jnyi opened this issue 2 years ago • 1 comments

Hi Team,

We are experimenting with thanos' promql engine and found this error when thanos receive started to ingest data for around 10 mins:

    receive
    "--query.promql-engine=thanos",
panic: runtime error: index out of range [0] with length 0

goroutine 144357 [running]:
github.com/thanos-community/promql-engine/execution/binary.(*scalarOperator).Next(0xc0a9ff8980, {0x2afd790, 0xc017465220})
	/go/pkg/mod/github.com/thanos-community/[email protected]/execution/binary/scalar.go:139 +0x92d
github.com/thanos-community/promql-engine/execution/binary.(*scalarOperator).Next(0xc0a9ff8a80, {0x2afd790, 0xc017465220})
	/go/pkg/mod/github.com/thanos-community/[email protected]/execution/binary/scalar.go:113 +0x1a2
github.com/thanos-community/promql-engine/execution/aggregate.(*aggregate).Next(0xc0a8bec9c0, {0x2afd790, 0xc017465220})
	/go/pkg/mod/github.com/thanos-community/[email protected]/execution/aggregate/hashaggregate.go:110 +0xb3
github.com/thanos-community/promql-engine/execution/exchange.(*concurrencyOperator).pull(0xc0aa290480, {0x2afd790, 0xc017465220})
	/go/pkg/mod/github.com/thanos-community/[email protected]/execution/exchange/concurrent.go:80 +0xe8
created by github.com/thanos-community/promql-engine/execution/exchange.(*concurrencyOperator).Next.func1
	/go/pkg/mod/github.com/thanos-community/[email protected]/execution/exchange/concurrent.go:56 +0x9b

jnyi avatar Mar 13 '23 06:03 jnyi

Thanks for reporting this. Do you happen to know which query caused this?

fpetkovski avatar Mar 13 '23 07:03 fpetkovski

Given the issue is old and we have correctness tests running, I will resolve it

yeya24 avatar Apr 16 '25 06:04 yeya24