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]: panic happened in badger on restart after the laptop pc is power off since of no power. #1846

Closed
sureone opened this issue Jan 16, 2023 · 1 comment
Labels
kind/bug Something is broken.

Comments

@sureone
Copy link

sureone commented Jan 16, 2023

What version of Badger are you using?

github.com/dgraph-io/badger/v3 v3.2103.4

What version of Go are you using?

1.18

Have you tried reproducing the issue with the latest release?

None

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

RAM: 32GB
CPU: Intel i5
OS: Windows 10

What steps will reproduce the bug?

power off the laptop
restart the programe

Expected behavior and actual result.

should read the db correctly.

Additional information

Exception has occurred: panic
"\n== Recovering from initIndex crash ==\nFile Info: [ID: 2, Size: 43...
Stack:
2 0x0000000001853dcc in github.com/dgraph-io/badger/v3/table.(*Table).initBiggestAndSmallest.func1.1
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:351
4 0x0000000001853525 in github.com/dgraph-io/badger/v3/table.(*Table).initBiggestAndSmallest.func1
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:397
7 0x00000000018374ef in github.com/google/flatbuffers/go.GetInt32
at go/pkg/mod/github.com/google/flatbuffers@v1.12.1/go/encode.go:85
8 0x000000000183783f in github.com/google/flatbuffers/go.GetUOffsetT
at go/pkg/mod/github.com/google/flatbuffers@v1.12.1/go/encode.go:121
9 0x000000000183c0b2 in github.com/dgraph-io/badger/v3/fb.GetRootAsTableIndex
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/fb/TableIndex.go:14
10 0x0000000001856a6d in github.com/dgraph-io/badger/v3/table.(*Table).readTableIndex
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:707
11 0x00000000018544fc in github.com/dgraph-io/badger/v3/table.(*Table).initIndex
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:462
12 0x0000000001852f2c in github.com/dgraph-io/badger/v3/table.(*Table).initBiggestAndSmallest
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:401
13 0x0000000001852910 in github.com/dgraph-io/badger/v3/table.OpenTable
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/table/table.go:308
14 0x0000000001895ea5 in github.com/dgraph-io/badger/v3.newLevelsController.func1
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/levels.go:150
15 0x00000000018959f1 in github.com/dgraph-io/badger/v3.newLevelsController.func3
at go/pkg/mod/github.com/dgraph-io/badger/v3@v3.2103.4/levels.go:165

@sureone sureone added the kind/bug Something is broken. label Jan 16, 2023
@mangalaman93
Copy link
Contributor

This seems like a duplicate of #1883

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

2 participants