influxdata / influxdata/influxdb

SIGSEGV in bbolt@v1.3.6/bucket.go:84

Open
#23,599 0 comments 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

influx doesnt start for me and doesnt really hint at whats wrong.

this is with /root on tmpfs, completely empty

```
ts=2022-08-02T12:29:01.811233Z lvl=info msg="Welcome to InfluxDB" log_id=0c3dLDwW000 version=v2.3.0+SNAPSHOT.090f681737 commit=090f681737 build_date=2022-06-16T19:33:50Z
ts=2022-08-02T12:29:01.820259Z lvl=info msg="Resources opened" log_id=0c3dLDwW000 service=bolt path=/root/.influxdbv2/influxd.bolt
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9bef4f]

goroutine 1 [running]:
go.etcd.io/bbolt.(*Bucket).Cursor(...)
/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/bucket.go:84
go.etcd.io/bbolt.(*Bucket).Get(0x0, {0x4627a88, 0x2, 0x2})
/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/bucket.go:262 +0x2f
github.com/influxdata/influxdb/v2/bolt.(*Client).getID(0x4b959c9b0?, 0x9c450c?)
/root/project/bolt/id.go:62 +0x51
github.com/influxdata/influxdb/v2/bolt.(*Client).ID.func1(0xffffffffffffffff?)
/root/project/bolt/id.go:45 +0x2c
go.etcd.io/bbolt.(*DB).View(0x302020303030303?, 0x4b959ca68)
/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/db.go:772 +0x82
github.com/influxdata/influxdb/v2/bolt.(*Client).ID(0x4b8dfa1e0)
/root/project/bolt/id.go:44 +0x8a
github.com/influxdata/influxdb/v2/cmd/influxd/launcher.(*Launcher).openMetaStores(0x4b9602fc0, {0x33b56d8, 0x4b8b4e3c0}, 0x4b85b9c00)
/root/project/cmd/influxd/launcher/launcher.go:995 +0x15a7
github.com/influxdata/influxdb/v2/cmd/influxd/launcher.(*Launcher).run(0x4b9602fc0, {0x33b56d8?, 0x4b8b4e180?}, 0x4b85b9c00)
/root/project/cmd/influxd/launcher/launcher.go:253 +0xddf
github.com/influxdata/influxdb/v2/cmd/influxd/launcher.cmdRunE.func1()
/root/project/cmd/influxd/launcher/cmd.go:124 +0x2da
github.com/influxdata/influxdb/v2/kit/cli.NewCommand.func1(0x4b8169080?, {0x885e4b8?, 0x0?, 0x0?})
/root/project/kit/cli/viper.go:54 +0x1e
github.com/spf13/cobra.(*Command).execute(0x4b8169080, {0x4b8110210, 0x0, 0x0})
/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x4b8169080)
/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x39c
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main()
/root/project/cmd/influxd/main.go:61 +0x4b8

```

Contributor guide

Open the contributing guide

Research direction

Start with bolt/id.go at getID and ID, then trace the startup path through cmd/influxd/launcher/launcher.go:995. Reproduce the empty /root-on-tmpfs startup scenario if possible and inspect the bbolt access shown in the stack trace. Done means InfluxDB no longer panics during startup and reports a useful failure or handles the empty state correctly.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.