Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

br panic when backup gcs url has no folder #661

Closed
aytrack opened this issue Dec 25, 2020 · 0 comments · Fixed by #664
Closed

br panic when backup gcs url has no folder #661

aytrack opened this issue Dec 25, 2020 · 0 comments · Fixed by #664
Assignees
Labels
severity/major type/bug Something isn't working

Comments

@aytrack
Copy link

aytrack commented Dec 25, 2020

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
./br backup full -s "gcs://hchwang-test" --pd $PD_ENDPOINT
  1. What did you expect to see?
    backup successful or report an error message

  2. What did you see instead?
    br panic

 ./br backup full -s "gcs://hchwang-test" --pd $PD_ENDPOINT
Detail BR log in /var/folders/sf/1gtjmfdd3qb_ngk496qpzxph0000gp/T/br.log.2020-12-25T17.48.42+0800
panic: runtime error: slice bounds out of range [1:0]

goroutine 1 [running]:
github.com/pingcap/br/pkg/storage.ParseBackend(0x7ffeefbff4ac, 0x12, 0xc000378240, 0xc000242540, 0xc000792070, 0xc0006a71a0)
        github.com/pingcap/br@/pkg/storage/parse.go:73 +0xd2f
github.com/pingcap/br/pkg/task.RunBackup(0x347da60, 0xc0004dc140, 0x3498920, 0x4caee48, 0x2f43e49, 0xb, 0xc000378240, 0x0, 0x0)
        github.com/pingcap/br@/pkg/task/backup.go:187 +0x1c3
github.com/pingcap/br/cmd.runBackupCommand(0xc000780000, 0x2f43e49, 0xb, 0x0, 0x0)
        github.com/pingcap/br@/cmd/backup.go:24 +0x149
github.com/pingcap/br/cmd.newFullBackupCommand.func1(0xc000780000, 0xc0004dc880, 0x0, 0x4, 0x0, 0x0)
        github.com/pingcap/br@/cmd/backup.go:85 +0x40
github.com/spf13/cobra.(*Command).execute(0xc000780000, 0xc00004c0a0, 0x4, 0x4, 0xc000780000, 0xc00004c0a0)
        github.com/spf13/[email protected]/command.go:842 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002fa840, 0xc0006a7e38, 0x3, 0x3)
        github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:887
main.main()
        github.com/pingcap/br@/main.go:58 +0x350                 
  1. What version of BR and TiDB/TiKV/PD are you using?
➜  v4.0.9 ./br -V
Release Version: v4.0.9
Git Commit Hash: 804aa908719748888010edaa944757b82f99f4df
Git Branch: heads/refs/tags/v4.0.9
Go Version: go1.13.4
UTC Build Time: 2020-12-21 04:01:13
Race Enabled: false                 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity/major type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants