__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
The flux query works fine on x86
Flux Query:
import "strings"
from(bucket: "os/record")
|> range(start: -2m, stop: -1m)
|> filter(fn: (r) =>
(r["_measurement"] == "mount"))
|> filter(fn: (r) =>
(r["_field"] == "util"))
|> filter(fn: (r) =>
(strings.index(v: r["instance"], substr: "i-") == 0))
|> mean(column:"_value")
The null pointer is thrown by the mean function.
please note: max() and quantile calculation work with no issue
__Expected behavior:__
No Null Pointer Exception
__Actual behavior:__
Null Pointer Exception
__Environment info:__
Linux 4.14.177-139.254.amzn2.aarch64 aarch64
Influx 2.0.0-beta.12 (git: ff620782eb) build_date: 2020-06-12T22:41:00Z
containerd: 1.3.2
CPU: AWS Graviton2 c6g.xlarge
__Logs:__
ts=2020-06-12T22:28:48.904353Z lvl=info msg="Dispatcher panic" log_id=0NMdJ8C0000 service=storage-reads component=dispatcher error="panic: runtime error: invalid memory address or nil pointer dereference" stacktrace="goroutine 11075 [running]:\nruntime/debug.Stack(0x4001489e00, 0x30ec700, 0x1ff0c96)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x88\ngithub.com/influxdata/flux/execute.(poolDispatcher).Start.func1.1(0x4001489e60)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/dispatcher.go:81 +0x13c\npanic(0x1cba4c0, 0x425c4b0)\n\t/usr/local/go/src/runtime/panic.go:679 +0x194\ngithub.com/apache/arrow/go/arrow/math.Float64Funcs.Sum(...)\n\t/go/pkg/mod/github.com/apache/arrow/go/[email protected]/math/float64.go:38\ngithub.com/influxdata/flux/stdlib/universe.(MeanAgg).DoFloat(0x4002013a20, 0x40024e95c0)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/stdlib/universe/mean.go:144 +0x14c\ngithub.com/influxdata/flux/execute.(aggregateTransformation).Process.func1(0x315b8c0, 0x40024e9600, 0x0, 0xffff84165708)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/aggregate.go:142 +0x3b0\ngithub.com/influxdata/flux/execute.(tableBuffer).Do(0x4000b6f950, 0x4001030af0, 0x0, 0x0)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/table.go:64 +0xcc\ngithub.com/influxdata/flux/execute.(aggregateTransformation).Process(0x400101bb30, 0xcd5cfc81f3919fda, 0x72c1bd1cf28cf5ad, 0xffff8411f648, 0x4000b6f950, 0x1, 0x0)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/aggregate.go:127 +0x3f0\ngithub.com/influxdata/flux/execute.processMessage(0x3133840, 0x4000cc4d50, 0x313bc80, 0x400101bb30, 0x310e680, 0x40022d9a60, 0x4000f6ed00, 0x40022bbe8e, 0x0)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/transport.go:206 +0x248\ngithub.com/influxdata/flux/execute.(consecutiveTransport).processMessages(0x4001489f20, 0x3133840, 0x4000cc4d50, 0xa)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/transport.go:159 +0xb0\ngithub.com/influxdata/flux/execute.(poolDispatcher).run(0x4001489e60, 0x3133840, 0x4000cc4d50)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/dispatcher.go:132 +0x48\ngithub.com/influxdata/flux/execute.(poolDispatcher).Start.func1(0x4001489e60, 0x3133840, 0x4000cc4d50)\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/dispatcher.go:86 +0xa0\ncreated by github.com/influxdata/flux/execute.(*poolDispatcher).Start\n\t/go/pkg/mod/github.com/influxdata/[email protected]/execute/dispatcher.go:63 +0x74\n"
to add the issue is in beta.9, beta.10 and beta.12 (tested all 3 versions)
I have also had this problem. I tried the same setup on amd64, and it worked fine.
I did some more troubleshooting, and this problem seems to be happening when you use the Apache Arrow math library to sum an array of ints/floats. Flux already supports sum/mean without the shortcut (by iterating over the array) and I commented out the code and it no longer throws exceptions.
I am curious to know if the beta/nightly builds are running the tests, as there are a bunch of failures with flux.
diff.txt
I also see this problem on aarch64, but not in a container. The processor is not an AWS G2.
@FrankStienhans2 @benlamonica @majulier our 2.0.3 release includes an updated ARM64 build which we hope will address issues like this. You can download the binaries here: https://dl.influxdata.com/influxdb/releases/influxdb2-2.0.3_linux_arm64.tar.gz
Please let me know how it goes if you try it out!
Closing this as I've seen enough successful reports about the new ARM builds to be confident things work in general, but please do open new issues if you hit any problems!
Most helpful comment
I did some more troubleshooting, and this problem seems to be happening when you use the Apache Arrow math library to sum an array of ints/floats. Flux already supports sum/mean without the shortcut (by iterating over the array) and I commented out the code and it no longer throws exceptions.
I am curious to know if the beta/nightly builds are running the tests, as there are a bunch of failures with flux.
diff.txt