restic: restic hangs for any command on b2 repository
Output of restic version
restic 0.12.1 compiled with go1.17.3 on linux/amd64
How did you run restic exactly?
export B2_ACCOUNT_ID="<redacted>"
export B2_ACCOUNT_KEY="<redacted>"
restic -r b2:my-bucket:test init
restic -r b2:my-bucket:restic snapshots # where I have populated my-bucket/restic with an rclone of a local restic repository
I’ve tried with the master key, an application key with read/write on all buckets and an application with read/write access to just the one bucket. None work.
What backend/server/service did you use to store the repository?
Backblaze b2
Expected behavior
I can use the b2 backend of restic
Actual behavior
Running any command that uses a b2 repository, or inits a b2 repository simply hangs.
If I send it a SIGABRT I get:
SIGABRT: abort
PC=0x561f8aeeaf01 m=0 sigcode=0
goroutine 0 [idle]:
runtime.futex()
runtime/sys_linux_amd64.s:519 +0x21
runtime.futexsleep(0x561f8aeeaaf3, 0x13ef, 0x19989634)
runtime/os_linux.go:44 +0x36
runtime.notesleep(0x561f8c545fb0)
runtime/lock_futex.go:160 +0x87
runtime.mPark()
runtime/proc.go:1441 +0x2a
runtime.stopm()
runtime/proc.go:2408 +0x78
runtime.findrunnable()
runtime/proc.go:2984 +0x865
runtime.schedule()
runtime/proc.go:3367 +0x239
runtime.park_m(0xc0000001a0)
runtime/proc.go:3516 +0x14d
runtime.mcall()
runtime/asm_amd64.s:307 +0x45
goroutine 1 [select]:
github.com/kurin/blazer/b2.withBackoff({0x561f8bf1dac8, 0xc000548140}, {0x561f8bf324c8, 0xc00023ad80}, 0xc0005c2c08)
github.com/kurin/blazer@v0.5.3/b2/backend.go:757 +0x137
github.com/kurin/blazer/b2.(*beBucket).downloadFileByName(0x10100c0005c2ca0, {0x561f8bf1dac8, 0xc000548140}, {0xc000538410, 0x7fcc5ea40f18}, 0x7267000000000010, 0x7)
github.com/kurin/blazer@v0.5.3/b2/backend.go:446 +0xc5
github.com/kurin/blazer/b2.(*Bucket).getObject(0xc00028a960, {0x561f8bf1dac8, 0xc000548140}, {0xc000538410, 0xd})
github.com/kurin/blazer@v0.5.3/b2/b2.go:616 +0x55
github.com/kurin/blazer/b2.(*Object).ensure(0xc0005c2e70, {0x561f8bf1dac8, 0xc000548140})
github.com/kurin/blazer@v0.5.3/b2/b2.go:563 +0x45
github.com/kurin/blazer/b2.(*Object).Attrs(0xc0005c2e70, {0x561f8bf1dac8, 0xc000548140})
github.com/kurin/blazer@v0.5.3/b2/b2.go:443 +0x45
github.com/restic/restic/internal/backend/b2.(*b2Backend).Stat(0xc000292080, {0x561f8bf1dac8, 0xc000548140}, {{0x561f8b6bdb5c, 0x7ffd1d8ce181}, {0x0, 0x7ffd1d8ce18f}})
github.com/restic/restic/internal/backend/b2/b2.go:228 +0x156
main.open({_, _}, {{0x7ffd1d8ce17e, 0x17}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...)
github.com/restic/restic/cmd/restic/global.go:746 +0xb06
main.OpenRepository({{0x7ffd1d8ce17e, 0x17}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...})
github.com/restic/restic/cmd/restic/global.go:437 +0xa5
main.runKey({{0x7ffd1d8ce17e, 0x17}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...)
github.com/restic/restic/cmd/restic/cmd_key.go:184 +0x1a5
main.glob..func13(0x561f8c533680, {0xc00051de60, 0x3, 0x4})
github.com/restic/restic/cmd/restic/cmd_key.go:31 +0x6b
github.com/spf13/cobra.(*Command).execute(0x561f8c533680, {0xc000548340, 0x3, 0x4})
github.com/spf13/cobra@v1.2.1/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0x561f8c535480)
github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.2.1/command.go:902
main.main()
github.com/restic/restic/cmd/restic/main.go:98 +0x32
goroutine 19 [chan receive]:
github.com/restic/restic/internal/restic.init.0.func1.1()
github.com/restic/restic/internal/restic/lock.go:254 +0x77
created by github.com/restic/restic/internal/restic.init.0.func1
github.com/restic/restic/internal/restic/lock.go:251 +0x25
goroutine 34 [syscall]:
os/signal.signal_recv()
runtime/sigqueue.go:169 +0x98
os/signal.loop()
os/signal/signal_unix.go:24 +0x19
created by os/signal.Notify.func1.1
os/signal/signal.go:151 +0x2c
goroutine 35 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc00020a400)
go.opencensus.io@v0.23.0/stats/view/worker.go:276 +0xb9
created by go.opencensus.io/stats/view.init.0
go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0x92
goroutine 36 [chan receive]:
main.CleanupHandler(0x0)
github.com/restic/restic/cmd/restic/cleanup.go:59 +0x39
created by main.init.0
github.com/restic/restic/cmd/restic/cleanup.go:21 +0x90
rax 0xca
rbx 0x0
rcx 0x561f8aeeaf03
rdx 0x0
rdi 0x561f8c545fb0
rsi 0x80
rbp 0x7ffd1d8cd9c8
rsp 0x7ffd1d8cd980
r8 0x0
r9 0x0
r10 0x0
r11 0x286
r12 0x7ffd1d8cd9f0
r13 0x0
r14 0x561f8c545a80
r15 0x0
rip 0x561f8aeeaf01
rflags 0x286
cs 0x33
fs 0x0
gs 0x0
Steps to reproduce the behavior
set up a b2 bucket, create an application key with access to that bucket, try to run any restic command in that bucket.
Do you have any idea what may have caused this?
no
Do you have an idea how to solve the issue?
no
Did restic help you today? Did it make you happy in any way?
Restic looks really awsome, I wish I could get it to work with b2.
Possibly realted to https://github.com/restic/restic/issues/2172, although that is specifically about an api key limited to a specific prefix, and this fails for every token i’ve generated.
Note: rclone and using the b2 api with curl work fine, so this seems like something specific to restic.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 18 (4 by maintainers)
The domain
f003.backblazeb2.comhas recently been included in the Energized Ultimate blocklist. Some Backblaze buckets use this as their download URL. If you use this blocklist, then restic will be unable to resolve the domain and get stuck in a loop. As a workaround, you can whitelist this domain.