influxdata / influxdata/influxdb
page 20 already freed
- 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. podman pull influx:latest
2. podman run influx:latest
3. crash page double free
__Expected behavior:__
Launch just fine.
__Actual behavior:__
```
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reset OCSP cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reading OCSP Response cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json\n" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=error msg="failed to open. Ignored. open /home/influxdb/.cache/snowflake/ocsp_response_cache.json: no such file or directory\n" func="gosnowflake.(*defaultLogger).Errorf" file="log.go:120"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reset OCSP cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reading OCSP Response cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json\n" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=error msg="failed to open. Ignored. open /home/influxdb/.cache/snowflake/ocsp_response_cache.json: no such file or directory\n" func="gosnowflake.(*defaultLogger).Errorf" file="log.go:120"
Nov 04 13:48:47 jurassicpark podman[179806]: 2021-11-04T12:48:47.952501779Z info found existing boltdb file, skipping setup wrapper {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reset OCSP cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=info msg="reading OCSP Response cache file. /home/influxdb/.cache/snowflake/ocsp_response_cache.json\n" func="gosnowflake.(*defaultLogger).Infof" file="log.go:104"
Nov 04 13:48:47 jurassicpark podman[179806]: time="2021-11-04T12:48:47Z" level=error msg="failed to open. Ignored. open /home/influxdb/.cache/snowflake/ocsp_response_cache.json: no such file or directory\n" func="gosnowflake.(*defaultLogger).Errorf" file="log.go:120"
Nov 04 13:48:54 jurassicpark podman[179806]: ts=2021-11-04T12:48:54.504602Z lvl=info msg="Welcome to InfluxDB" log_id=0XbklSv0000 version=2.0.9 commit=d1233b7951 build_date=2021-10-01T21:09:53Z
Nov 04 13:48:54 jurassicpark podman[179806]: panic: page 20 already freed
Nov 04 13:48:54 jurassicpark podman[179806]: goroutine 1 [running]:
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*freelist).free(0xc001666080, 0x12d19a, 0x7fd0c2e46000)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/freelist.go:175 +0x2c8
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*node).spill(0xc00167e0e0)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/node.go:359 +0x216
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*node).spill(0xc00167e070)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/node.go:346 +0xaa
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*node).spill(0xc00167e000)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/node.go:346 +0xaa
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*Bucket).spill(0xc000a2f198)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/bucket.go:570 +0x32f
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*Tx).Commit(0xc000a2f180)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/tx.go:160 +0xe7
Nov 04 13:48:54 jurassicpark podman[179806]: go.etcd.io/bbolt.(*DB).Update(0x0, 0xc0005acb98)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/go.etcd.io/bbolt@v1.3.6/db.go:748 +0xe5
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/influxdata/influxdb/v2/bolt.(*Client).initialize(0xc00055c880, {0x1f, 0x0})
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/bolt/bbolt.go:88 +0x39
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/influxdata/influxdb/v2/bolt.(*Client).Open(0xc00166e0c0, {0x39711d8, 0xc00005e300})
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/bolt/bbolt.go:76 +0x20e
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/influxdata/influxdb/v2/cmd/influxd/launcher.(*Launcher).run(0xc00028cb60, {0x39711d8, 0xc00005e240}, 0xc00043c600)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influxd/launcher/launcher.go:260 +0xb36
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/influxdata/influxdb/v2/cmd/influxd/launcher.cmdRunE.func1()
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influxd/launcher/cmd.go:106 +0x2ec
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/influxdata/influxdb/v2/kit/cli.NewCommand.func1(0xc0000e2dc0, {0x9b7b308, 0x0, 0x0})
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/kit/cli/viper.go:54 +0x1e
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/spf13/cobra.(*Command).execute(0xc0000e2dc0, {0xc00004e210, 0x0, 0x0})
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x60e
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/spf13/cobra.(*Command).ExecuteC(0xc0000e2dc0)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x3ad
Nov 04 13:48:54 jurassicpark podman[179806]: github.com/spf13/cobra.(*Command).Execute(...)
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
Nov 04 13:48:54 jurassicpark podman[179806]: main.main()
Nov 04 13:48:54 jurassicpark podman[179806]: /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influxd/main.go:53 +0x41b
```
__Environment info:__
* System info: Linux 5.14.15-200.fc34.x86_64 x86_64
* InfluxDB version: `2.0.9`
* Other relevant environment details: `podman`
__Config:__
Copy any non-default config values here or attach the full config as a gist or file.
__Logs:__
Include snippet of errors in log.
__Performance:__
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.
```sh
# Commands should be run when the bug is actively happening.
# Note: This command will run for ~30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=30s"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz` and `iostat.txt` output files.
```
Contributor guide
Research direction
Start by reproducing the crash with `podman pull influx:latest` and `podman run influx:latest` on InfluxDB 2.0.9. Read `bolt/bbolt.go`, especially `Client.initialize` and `Client.Open`, alongside the stack trace through `cmd/influxd/launcher/launcher.go`. Done means InfluxDB launches without the `page 20 already freed` panic.
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
- Needs clarification
- Newbie friendliness
- 25/100