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

[BUG]: <Index Init Error giving out of bounds> #2007

Open
Akhilesh53 opened this issue Sep 20, 2023 · 0 comments
Open

[BUG]: <Index Init Error giving out of bounds> #2007

Akhilesh53 opened this issue Sep 20, 2023 · 0 comments
Labels
kind/bug Something is broken.

Comments

@Akhilesh53
Copy link

What version of Badger are you using?

Badger Version: 4.2.0

What version of Go are you using?

Golang Version
1.20

Have you tried reproducing the issue with the latest release?

None

What is the hardware spec (RAM, CPU, OS)?

Linux, 8 Core, 16 GB Ram

What steps will reproduce the bug?

opts := badger.DefaultOptions(dataDir + "/" + name)
opts.InMemory = false
opts.Compression = options.None
opts.NumCompactors = 2
opts.NumGoroutines = 4
opts.BlockCacheSize = 0
db, err := badger.Open(opts)

Expected behavior and actual result.

Previously it was running fine. But for the last couple of days, it has continuously given this error.

panic: runtime error: slice bounds out of range [-1510754181:] [recovered]
	panic: runtime error: slice bounds out of range [-1510754181:]
	panic: 
== Recovering from initIndex crash ==
File Info: [ID: 478, Size: 112734787, Zeros: 0]
isEnrypted: false checksumLen: 1623488964 
== Recovered ==


goroutine 13114343 [running]:
github.com/dgraph-io/badger/v4/table.(*Table).initBiggestAndSmallest.func1.1()
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:353 +0xa8
panic({0xba4620, 0xc024f187c8})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/dgraph-io/ristretto/z.(*MmapFile).Bytes(...)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/ristretto/z/file.go:116
github.com/dgraph-io/badger/v4/table.(*Table).read(...)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:420
github.com/dgraph-io/badger/v4/table.(*Table).readNoFail(0xcf03a0?, 0xc4a36e0060?, 0xbf9522?)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:424 +0xd0
github.com/dgraph-io/badger/v4/table.(*Table).initBiggestAndSmallest.func1()
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:383 +0x2ff
panic({0xba4620, 0xc024f187b0})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/dgraph-io/ristretto/z.(*MmapFile).Bytes(...)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/ristretto/z/file.go:116
github.com/dgraph-io/badger/v4/table.(*Table).read(...)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:420
github.com/dgraph-io/badger/v4/table.(*Table).readNoFail(0x4439b1?, 0x0?, 0x9?)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:424 +0xd0
github.com/dgraph-io/badger/v4/table.(*Table).initIndex(0xc649fabc80)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:445 +0x109
github.com/dgraph-io/badger/v4/table.(*Table).initBiggestAndSmallest(0xc649fabc80)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:403 +0x7f
github.com/dgraph-io/badger/v4/table.OpenTable(0xc00e82d940, {0x0, 0x1, 0x1000000, 0xf33333, 0x0, 0x3f847ae147ae147b, 0x1000, 0x0, 0x0, ...})
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:309 +0x278
github.com/dgraph-io/badger/v4/table.CreateTable({0xc00e8052c0, 0x54}, 0xc011a53050)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/table/table.go:273 +0x305
github.com/dgraph-io/badger/v4.(*levelsController).subcompact.func4(0xc011a53050, 0x0?)
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/levels.go:846 +0x112
created by github.com/dgraph-io/badger/v4.(*levelsController).subcompact
	/data/dedupe/badger_broadband/badger_grpc/vendor/github.com/dgraph-io/badger/v4/levels.go:836 +0x6e7

Additional information

NA

@Akhilesh53 Akhilesh53 added the kind/bug Something is broken. label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

1 participant