influxdata / influxdata/influxdb

Flux script panic runtime error on raspbian

Open
#19,810 10 comments 12 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__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:__

* System info: Linux 4.19.75-v7l+ armv7l
* InfluxDB version: InfluxDB v1.8.3 (git: 1.8 563e6c3d1a7a2790763c6289501095dbec19244e)
* Other relevant environment details: Raspbian, Raspberry Pi 4 Model B, Chronograf Version: 1.7.17

__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](https://github.com/influxdata/influxdb/files/5428889/profiles.tar.gz)
[iostat.txt](https://github.com/influxdata/influxdb/files/5428890/iostat.txt)
[vars.txt](https://github.com/influxdata/influxdb/files/5428892/vars.txt)

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Flux query from Chronograf on the stated Raspberry Pi and review the InfluxDB dispatcher panic in the supplied logs. Use the environment details and profiles to narrow the failing path; done means the query completes without a nil-pointer panic and returns the expected results.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.