influxdata / influxdata/influxdb
panic: runtime error to InfluxDB OSS V2.2.0
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. `from(bucket: "iot")
|> range(start: 1655601472, stop: 1655687872)
|> filter(fn: (r) => r._measurement == "15105")
|> sort(columns: ["_time"], desc: true)
|> limit(n: 10, offset: -10)
`
2. if => offset: -10
3. panic: runtime error: slice bounds out of range [-10:]
__Environment info:__
* System info: Linux 3.10.0-862.el7.x86_64 x86_64
* InfluxDB version: InfluxDB v2.2.0 (git: a2f8538837) build_date: 2022-04-06T17:36:40Z
__Logs:__
goroutine 101245 [running]:
github.com/apache/arrow/go/v7/arrow/array.(*Int64).setData(0xc08fe27c40, 0xc08fea2120)
/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.0/arrow/array/numeric.gen.go:80 +0x154
github.com/apache/arrow/go/v7/arrow/array.NewInt64Data(...)
/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.0/arrow/array/numeric.gen.go:39
github.com/apache/arrow/go/v7/arrow/array.init.0.func10({0x3e01780, 0xc08fea2120})
/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.0/arrow/array/array.go:160 +0x5a
github.com/apache/arrow/go/v7/arrow/array.MakeFromData({0x3e01780, 0xc08fea2120})
/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.0/arrow/array/array.go:133 +0x57
github.com/apache/arrow/go/v7/arrow/array.NewSlice({0x3e0def8, 0xc08fe27a00}, 0xc08fe27a00, 0xc08fe453b0)
/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.0/arrow/array/array.go:144 +0x54
github.com/influxdata/flux/array.Slice({0x3dfdf18, 0xc08fe27a00}, 0x0, 0x1cf6226)
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/array/array.go:202 +0x79
github.com/influxdata/flux/arrow.Slice(...)
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/arrow/utils.go:130
github.com/influxdata/flux/stdlib/universe.(*limitTransformation).limitTable.func1({0x3e110f8, 0xc08fe27b40})
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/stdlib/universe/limit.go:175 +0x1e5
github.com/influxdata/flux/execute.(*consecutiveTransportTable).Do.func1({0x3e110f8, 0xc08fe27b40})
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/execute/transport.go:538 +0x542
github.com/influxdata/flux/execute/table.(*BufferedTable).Do(0x3b75020, 0xc08fe48750)
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/execute/table/buffered.go:69 +0x19b
github.com/influxdata/flux/execute.(*consecutiveTransportTable).Do(0xc08fe48720, 0xc08fe41000)
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/execute/transport.go:520 +0x87
github.com/influxdata/flux/stdlib/universe.(*limitTransformation).limitTable(0xc08fe32390, {0x8, 0x0}, 0xc08fe27bc0, {0x3dde338, 0xc08fe48720})
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/stdlib/universe/limit.go:145 +0xdf
github.com/influxdata/flux/stdlib/universe.(*limitTransformation).Process.func1({0x3dd2478, 0xc08fe27b80}, 0xc08adadf70)
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/stdlib/universe/limit.go:135 +0x3e
github.com/influxdata/flux/internal/execute/table.StreamWithContext.func1()
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/internal/execute/table/stream.go:109 +0xa6
created by github.com/influxdata/flux/internal/execute/table.StreamWithContext
/go/pkg/mod/github.com/influxdata/flux@v0.161.0/internal/execute/table/stream.go:106 +0x225
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with stdlib/universe/limit.go at limitTransformation.limitTable, then reproduce the Flux query using offset: -10. Trace the slice call through array/array.go and the Apache Arrow stack frames. Done means the query no longer panics for a negative offset and has a defined result or error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100