Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

influx --full restore causes panic (segfault) at v2.0.6 #21442

Closed
kyontan opened this issue May 9, 2021 · 1 comment
Closed

influx --full restore causes panic (segfault) at v2.0.6 #21442

kyontan opened this issue May 9, 2021 · 1 comment

Comments

@kyontan
Copy link

kyontan commented May 9, 2021

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. influx restore --full ./

(No exported data is required to reproduce error, it seems panic occured before accessing exported data.)

Expected behavior:

Start restore process.

Describe what you expected to happen.

Actual behavior:

Panic occurs

Environment info:

  • System info: Run uname -srm and copy the output here
  • Linux 5.4.0-72-generic x86_64
  • InfluxDB version: Run influxd version and copy the output here
  • InfluxDB 2.0.6 (git: 4db98b4c9a) build_date: 2021-04-29T16:48:12Z
  • Other relevant environment details: Container runtime, disk info, etc
  • Used docker image influx:2.0.6 (the latest release as of 2021-05-09)

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.

# influx restore --full ./
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1047cbb]

goroutine 1 [running]:
github.com/influxdata/influxdb/v2/restore.(*restoreRunner).restoreKV(0xc0007bf9a0, 0x1b1ea00, 0xc000042050, 0x7ffe74e3dedd, 0x2, 0x0, 0x0)
        /home/circleci/go/src/github.com/influxdata/influxdb/restore/restore.go:169 +0x5b
github.com/influxdata/influxdb/v2/restore.(*restoreRunner).fullRestore(0xc0007bf9a0, 0x1b1ea00, 0xc000042050, 0x7ffe74e3dedd, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/circleci/go/src/github.com/influxdata/influxdb/restore/restore.go:131 +0x79
github.com/influxdata/influxdb/v2/restore.RunRestore(0x1b1ea00, 0xc000042050, 0x7ffe74e3dedd, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/circleci/go/src/github.com/influxdata/influxdb/restore/restore.go:76 +0x138
main.(*cmdRestoreBuilder).restoreRunE(0xc0005be270, 0xc0005b7080, 0xc0005ec8e0, 0x1, 0x2, 0x0, 0x0)
        /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influx/restore.go:126 +0x4b8
main.checkSetupRunEMiddleware.func1.1(0xc0005b7080, 0xc0005ec8e0, 0x1, 0x2, 0x0, 0x0)
        /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influx/main.go:466 +0x76
github.com/spf13/cobra.(*Command).execute(0xc0005b7080, 0xc0005ec8c0, 0x2, 0x2, 0xc0005b7080, 0xc0005ec8c0)
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000556840, 0x0, 0x0, 0xc000556840)
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/circleci/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main()
        /home/circleci/go/src/github.com/influxdata/influxdb/cmd/influx/main.go:43 +0x58

Performance:
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.

# 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.
@danxmoran
Copy link
Contributor

I believe this was fixed by #21477. As of 2.0.7 influx restore will return an error instead of panicking when it doesn't find any backup manifests at the given path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants