Skip to content

[go-ds-badger in go-ipfs] panic: slice bounds out of range #111

@lidel

Description

@lidel

Version information:

go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/linux
Golang version: go1.15.8

Description:

I created empty repo with sharding and badger datastore and imported wikipedia mirror for zh locale (ipfs/distributed-wikipedia-mirror#91, ~83G):

$ ipfs files stat /ipfs/bafybeiazgazbrj6qprr4y5hx277u4g2r5nzgo3jnxkhqx56doxdqrzms6y
bafybeiazgazbrj6qprr4y5hx277u4g2r5nzgo3jnxkhqx56doxdqrzms6y
Size: 0
CumulativeSize: 83811794959
ChildBlocks: 11
Type: directory

After 19 hours ipfs daemon crashed with this error:

panic: runtime error: slice bounds out of range [:783531241] with capacity 262252
Click to expand full stacktrace
panic: runtime error: slice bounds out of range [:783531241] with capacity 262252

goroutine 1869 [running]:
github.com/dgraph-io/badger.(*valueLog).Read(0xc000db04f0, 0x4006c00000052, 0x2eae962e, 0xc00873bb80, 0x2, 0x0, 0xc011165163, 0xc, 0xd, 0x1545ab)
        github.com/dgraph-io/badger@v1.6.2/value.go:1249 +0x635
github.com/dgraph-io/badger.(*Item).yieldItemValue(0xc0062c4f20, 0x0, 0x0, 0xc006f858f8, 0xc006f858a0, 0xba6af8, 0xc0062c4f20)
        github.com/dgraph-io/badger@v1.6.2/iterator.go:169 +0x11d
github.com/dgraph-io/badger.(*Item).ValueCopy(0xc0062c4f20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/dgraph-io/badger@v1.6.2/iterator.go:126 +0x17e
github.com/ipfs/go-ds-badger.(*txn).get(0xc006f859b0, 0xc0140070e0, 0x42, 0x0, 0x0, 0xc006f859c0, 0xbc11bb, 0x3d148e5171380)
        github.com/ipfs/go-ds-badger@v0.2.6/datastore.go:608 +0xe5
github.com/ipfs/go-ds-badger.(*Datastore).Get(0xc0030b5d40, 0xc0140070e0, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/ipfs/go-ds-badger@v0.2.6/datastore.go:317 +0x170
github.com/ipfs/go-ds-measure.(*measure).Get(0xc000d9a000, 0xc0140070e0, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/ipfs/go-ds-measure@v0.1.0/measure.go:198 +0xf5
github.com/ipfs/go-ds-measure.(*measure).Get(0xc000d9a600, 0xc0140070e0, 0x42, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/ipfs/go-ds-measure@v0.1.0/measure.go:198 +0xf5
github.com/ipfs/go-datastore/keytransform.(*Datastore).Get(0xc00345ee80, 0xc00a930940, 0x3b, 0xc00a930940, 0x3b, 0x30, 0x1, 0x0)
        github.com/ipfs/go-datastore@v0.4.5/keytransform/keytransform.go:47 +0x76
github.com/ipfs/go-ipfs-blockstore.(*blockstore).Get(0xc00345eea0, 0xc00805daa0, 0x24, 0x0, 0xc00d5c6b68, 0x12, 0xc00013d568)
        github.com/ipfs/go-ipfs-blockstore@v0.1.4/blockstore.go:123 +0xb8
github.com/ipfs/go-ipfs/thirdparty/verifbs.(*VerifBS).Get(0xc0002055c0, 0xc00805daa0, 0x24, 0x1, 0x40000, 0x1, 0x2c)
        github.com/ipfs/go-ipfs@v0.8.0/thirdparty/verifbs/verifbs.go:61 +0x8e
github.com/ipfs/go-ipfs-blockstore.(*arccache).Get(0xc00340ee00, 0xc00805daa0, 0x24, 0x0, 0x0, 0x0, 0x10a7286)
        github.com/ipfs/go-ipfs-blockstore@v0.1.4/arc_cache.go:118 +0xbc
github.com/ipfs/go-ipfs-blockstore.(*idstore).Get(0xc000205620, 0xc00805daa0, 0x24, 0xc006f85dc8, 0x17698ad, 0xc006f85db8, 0xc006f85db8)
        github.com/ipfs/go-ipfs-blockstore@v0.1.4/idstore.go:57 +0xd7
github.com/ipfs/go-ipfs/thirdparty/cidv0v1.(*blockstore).Get(0xc000205630, 0xc00805daa0, 0x24, 0xc006f85f1c, 0x2, 0x2, 0x100000220f160)
        github.com/ipfs/go-ipfs@v0.8.0/thirdparty/cidv0v1/blockstore.go:31 +0x4b
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).getBlocks.func1(0xc00805daa0, 0x24)
        github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:95 +0x70
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).jobPerKey.func1()
        github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:116 +0x42
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).worker(0xc003697230)
        github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:49 +0x3b
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).start.func1(0x225b200, 0xc0037a83c0)
        github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:38 +0x2a
github.com/jbenet/goprocess.(*process).Go.func1(0xc000205d00, 0xc0037a83c0, 0xc0037a8420)
        github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:134 +0x3c
created by github.com/jbenet/goprocess.(*process).Go
        github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:133 +0x1fe

Parent is shutting down, bye...

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions