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

debug(tableIndex): add debug info for initIndex #1626

Merged
merged 5 commits into from
Jan 5, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Dec 23, 2020

Fixes DGRAPH-2841

This PR adds debug information for the following crash. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of sst files.

panic: runtime error: index out of range [3] with length 0
panic: runtime error: index out of range [3] with length 0

goroutine 187 [running]:
github.com/google/flatbuffers/go.GetInt32(...)
	/go/pkg/mod/github.com/google/flatbuffers@v1.12.0/go/encode.go:85
github.com/google/flatbuffers/go.GetUOffsetT(...)
	/go/pkg/mod/github.com/google/flatbuffers@v1.12.0/go/encode.go:121
github.com/dgraph-io/badger/v2/fb.GetRootAsTableIndex(...)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/fb/TableIndex.go:14
github.com/dgraph-io/badger/v2/table.(*Table).readTableIndex(0xc0005dc000, 0x0, 0x8, 0xc0001fe210)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/table/table.go:654 +0x234
github.com/dgraph-io/badger/v2/table.(*Table).initIndex(0xc0005dc000, 0xc000075ac0, 0x7f8be018d4c0, 0xc00004a000)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/table/table.go:412 +0x285
github.com/dgraph-io/badger/v2/table.(*Table).initBiggestAndSmallest(0xc0005dc000, 0x0, 0x0)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/table/table.go:351 +0x5e
github.com/dgraph-io/badger/v2/table.OpenTable(0xc000182280, 0x0, 0x200000, 0x0, 0x0, 0x3f847ae147ae147b, 0x1000, 0x0, 0x1, 0xc000560080, ...)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/table/table.go:312 +0x22d
github.com/dgraph-io/badger/v2.newLevelsController.func1(0xc00048c7c0, 0xc0001f41e0, 0xc000098c00, 0xc0001f41b8, 0xc00020e2c0, 0x7, 0x7, 0xc0001f4220, 0xc, 0x1d6b606, ...)
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/levels.go:150 +0x205
created by github.com/dgraph-io/badger/v2.newLevelsController
	/go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20201214114056-bcfae6104545/levels.go:129 +0x645


This change is Reviewable

table/table.go Outdated Show resolved Hide resolved
table/table.go Outdated Show resolved Hide resolved
@NamanJain8 NamanJain8 merged commit 9961bb4 into master Jan 5, 2021
@NamanJain8 NamanJain8 deleted the naman/debug-initIndex branch January 5, 2021 05:59
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
This PR adds debug information for the crash in `initIndex`. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of SST files.
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
This PR adds debug information for the crash in `initIndex`. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of SST files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants