influxdata / influxdata/influxdb

runtime error: gobytes: length out of range

Open
#24,170 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

version : 2.0.9

During my use, there is a problem in the log。log content eg:
Mar 21 19:01:23 mqtt201 systemd: Started Session 523 of user root.

Mar 21 19:01:48 mqtt201 influxd-systemd-start.sh: ts=2023-03-21T11:01:47.046883Z lvl=info msg="panic during program start" log_id=0gUGa7c0000 service=storage-reads error="runtime error: gobytes: length out of range" stacktrace="goroutine 3628 [running]:\nruntime/debug.Stack()\n\t/home/circleci/.tools/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/influxdata/influxdb/v2/query/control.(*Controller).executeQuery.func1()\n\t/home/circleci/go/src/github.com/influxdata/influxdb/query/control/controller.go:457 +0x125\npanic({0x35c9e00, 0x38f9b88})\n\t/home/circleci/.tools/go/src/runtime/panic.go:1038 +0x215\ngithub.com/influxdata/flux/libflux/go/libflux._Cfunc_GoBytes(...)\n\t_cgo_gotypes.go:84\ngithub.com/influxdata/flux/libflux/go/libflux.(*SemanticPkg).MarshalFB.func4(0x35f1720)\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/libflux/go/libflux/analyze.go:35 +0x45\ngithub.com/influxdata/flux/libflux/go/libflux.(*SemanticPkg).MarshalFB(0xc055c9c808)\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/libflux/go/libflux/analyze.go:35 +0x1db\ngithub.com/influxdata/flux/runtime.AnalyzePackage({0x3948c90, 0xc06c53ed68})\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/runtime/analyze_libflux.go:24 +0xb4\ngithub.com/influxdata/flux/runtime.(*runtime).Eval(0x9b42900, {0x3971280, 0xc080999bc0}, {0x3948c90, 0xc06c53ed68}, {0x393fd98, 0x9b7b308}, {0xc05f951de0, 0x2, 0x2})\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/runtime/runtime.go:121 +0x5b\ngithub.com/influxdata/flux/lang.(*AstProgram).getSpec(0xc04057def0, {0x3971280, 0xc080999b90}, 0x38f65d8)\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/lang/compiler.go:447 +0x224\ngithub.com/influxdata/flux/lang.(*AstProgram).Start(0xc04057def0, {0x3971280, 0xc080999ad0}, 0xc07e711f6c)\n\t/home/circleci/go/pkg/mod/github.com/influxdata/[flux@v0.131.0](mailto:flux@v0.131.0)/lang/compiler.go:484 +0x191\ngithub.com/influxdata/influxdb/v2/query/control.(*Controller).executeQuery(0xc07e711f78, 0xc05f900180)\n\t/home/circleci/go/src/github.com/influxdata/influxdb/query/control/controller.go:480 +0x226\ngithub.com/influxdata/influxdb/v2/query/control.(*Controller).processQueryQueue(0xc02dfc6300)\n\t/home/circleci/go/src/github.com/influxdata/influxdb/query/control/controller.go:438 +0x2e\ngithub.com/influxdata/influxdb/v2/query/control.New.func1()\n\t/home/circleci/go/src/github.com/influxdata/influxdb/query/control/controller.go:220 +0x5d\ncreated by github.com/influxdata/influxdb/v2/query/control.New\n\t/home/circleci/go/src/github.com/influxdata/influxdb/query/control/controller.go:218 +0xa1b\n"

Mar 21 19:02:37 mqtt201 auditd[1301]: Audit daemon rotating log files.

And. Happens every hour

Contributor guide

Open the contributing guide

Research direction

Start with query/control/controller.go around executeQuery and processQueryQueue, then trace the stack through flux/libflux/go/libflux/analyze.go, runtime/analyze_libflux.go, and lang/compiler.go. Reproduce the hourly panic on InfluxDB 2.0.9 if possible, identify the input or state that reaches GoBytes with an invalid length, and verify the recurring runtime error is prevented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.