influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.63k stars 3.54k forks source link

Flux script panic runtime error on raspbian #19810

Open robomotic opened 3 years ago

robomotic commented 3 years ago

Steps to reproduce: From Chronograf, I run a Flux script as in the demo:

from(bucket:"telegraf/autogen")
  |> range(start: -1h)
  |> filter(fn: (r) =>
    r._measurement == "cpu" and
    r._field == "usage_system" and
    r.cpu == "cpu-total"
  )
  |> window(every: 5m)
  |> mean()

Tick Scripts and Influx equivalent query are running perfectly.

Expected behavior: This query should just work.

Actual behavior:

From the panel I get this error: panic: runtime error: invalid memory address or nil pointer dereference

Environment info:

Config:

flux-enabled = true

Logs:

Oct 23 11:12:21 raspberrypi influxd[29011]: ts=2020-10-23T10:12:21.821813Z lvl=error msg="[500] - \"panic: runtime error: invalid memory address or nil pointer dereference\"" log_id=0Q1EfghW000 service=httpd
Oct 23 11:12:21 raspberrypi influxd[29011]: ts=2020-10-23T10:12:21.821371Z lvl=info msg="Dispatcher panic" log_id=0Q1EfghW000 component=dispatcher error="panic: runtime error: invalid memory address or nil pointer dereference"

Performance: Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.

profiles.tar.gz iostat.txt vars.txt

ced2git commented 3 years ago

i have the same behavior.

Mean, Sum function are not working while count or median are.

lclfans commented 3 years ago

i also met the same issue for sum function.

is there any workaround for this issue? it blocks my test now.

robomotic commented 3 years ago

Yes I can confirm the same behaviour.

rds76 commented 3 years ago

Same here

angadsingh commented 3 years ago

same here! this is ridiculous. none of the aggregations except count and mean work in influx 1.8 on raspbian! please fix this.

Bch78 commented 3 years ago

Same problem on "raspberry Pi 4B / Raspbian 32 bits" and "InfluxDB v1.8":

The script: from(bucket:"DB_EcoCompteurLegrand") |> range(start: -5d) |> filter(fn:(r) => r._measurement == "prises" and r.type == "jours" ) |> difference() |> sum()

is aborted with the error: Dec 27 10:06:34 raspberrypi influxd[10134]: ts=2020-12-27T09:06:34.741536Z lvl=info msg="Dispatcher panic" log_id=0REje_dW000 component=dispatcher error="panic: runtime error: invalid memory address or nil pointer dereference"

Additional info:

It seams that nobody take care of this problem first opened on October ?

As a workaround to the "sum()" problem if have use instead a combination of "cumulativeSum()" piped to a 'last()" functions: from(bucket:"DB_EcoCompteurLegrand") |> range(start: -5d) |> filter(fn:(r) => r._measurement == "prises" and r.type == "jours" ) |> difference() // |> sum() is aborted so replaced by the two following functions: |> cumulativeSum() |> last()

ootjersb commented 3 years ago

Same problem. Raspberry Pi 3B+ on buster release. InfluxDB 1.8.3. Chronograph 1.8.5

raymondhfeng commented 3 years ago

Same. Raspberry Pi 3 on Buster, InfluxDB 1.8.3 Chronograph 1.8.5

fonsecapaulo commented 3 years ago

Same problem on "raspberry Pi 4B / Raspbian 32 bits" and "InfluxDB v1.8.2" and Chronograph 1.8.8

fonsecapaulo commented 3 years ago

Seems like Flux is not 100% compatible with Arm Architectures https://github.com/influxdata/flux/issues/2505