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

Nil pointer in leveldb #373

Open
rjl493456442 opened this issue Sep 23, 2021 · 0 comments
Open

Nil pointer in leveldb #373

rjl493456442 opened this issue Sep 23, 2021 · 0 comments

Comments

@rjl493456442
Copy link
Contributor

rjl493456442 commented Sep 23, 2021

Hi, recently we received an issue report in Go-ethereum project, it's a leveldb relevant panic because of nil pointer.
The version we used is https://github.com/syndtr/goleveldb/blob/64b5b1c739545ed311fb9d9924d19d188fabdc83

The original stack trace can be found here.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x31 pc=0x7359de]

goroutine 2322980 [running]:
github.com/syndtr/goleveldb/leveldb/table.(*Reader).newBlockIter(0xc0f97ffb60, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0)
        github.com/syndtr/[email protected]/leveldb/table/reader.go:733 +0xbe
github.com/syndtr/goleveldb/leveldb/table.(*Reader).find(0xc0f97ffb60, 0xc0ff4e6240, 0x28, 0x28, 0x1, 0x0, 0xffffffffffffff00, 0x0, 0x0, 0x0, ...)
        github.com/syndtr/[email protected]/leveldb/table/reader.go:835 +0x1a5
github.com/syndtr/goleveldb/leveldb/table.(*Reader).Find(...)
        github.com/syndtr/[email protected]/leveldb/table/reader.go:922
github.com/syndtr/goleveldb/leveldb.(*tOps).find(0xc0001ef2c0, 0xc03df6a870, 0xc0ff4e6240, 0x28, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        github.com/syndtr/[email protected]/leveldb/table.go:450 +0x150
github.com/syndtr/goleveldb/leveldb.(*version).get.func1(0x5, 0xc03df6a870, 0x20)
        github.com/syndtr/[email protected]/leveldb/version.go:180 +0x465
github.com/syndtr/goleveldb/leveldb.(*version).walkOverlapping(0xc127a5cc60, 0x0, 0x0, 0x0, 0xc0ff4e6240, 0x28, 0x28, 0xc0e4e893b8, 0xc0e4e89388)
        github.com/syndtr/[email protected]/leveldb/version.go:128 +0x479
github.com/syndtr/goleveldb/leveldb.(*version).get(0xc127a5cc60, 0x0, 0x0, 0x0, 0xc0ff4e6240, 0x28, 0x28, 0x0, 0x19917b00, 0x0, ...)
        github.com/syndtr/[email protected]/leveldb/version.go:164 +0x2f1
github.com/syndtr/goleveldb/leveldb.(*DB).get(0xc0002bf180, 0x0, 0x0, 0x0, 0x0, 0xc0e16f2380, 0x20, 0x20, 0x540f9912, 0x0, ...)
        github.com/syndtr/[email protected]/leveldb/db.go:785 +0x385
github.com/syndtr/goleveldb/leveldb.(*DB).Get(0xc0002bf180, 0xc0e16f2380, 0x20, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/syndtr/[email protected]/leveldb/db.go:851 +0x13b
github.com/ethereum/go-ethereum/ethdb/leveldb.(*Database).Get(0xc000bbe800, 0xc0e16f2380, 0x20, 0x20, 0x10000c0ff4e6210, 0x7f521445d738, 0x0, 0x20, 0x7f523c3aa3c8)
        github.com/ethereum/go-ethereum/ethdb/leveldb/leveldb.go:189 +0x5a
github.com/ethereum/go-ethereum/core/rawdb.ReadTrieNode(...)
        github.com/ethereum/go-ethereum/core/rawdb/accessors_state.go:80
github.com/ethereum/go-ethereum/trie.(*Sync).children(0xc0e4bcffc0, 0xc008d88500, 0x17d8258, 0xc0271dba40, 0xb3, 0xb3, 0x17d8258, 0xc0271dba40, 0x0)
        github.com/ethereum/go-ethereum/trie/sync.go:424 +0x8f2
github.com/ethereum/go-ethereum/trie.(*Sync).Process(0xc0e4bcffc0, 0xd900a9b35239e6bc, 0xca98340f73c8bfa7, 0x957e224c68dc755b, 0xd23f87c51f7430cb, 0xc046e4a3c0, 0xb3, 0xb3, 0xc01230c138, 0x8)
        github.com/ethereum/go-ethereum/trie/sync.go:291 +0x245
github.com/ethereum/go-ethereum/eth/downloader.(*stateSync).processNodeData(0xc0d8fe6aa0, 0xc046e4a3c0, 0xb3, 0xb3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        github.com/ethereum/go-ethereum/eth/downloader/statesync.go:594 +0x19f
github.com/ethereum/go-ethereum/eth/downloader.(*stateSync).process(0xc0d8fe6aa0, 0xc10aa0e7e0, 0x0, 0x0, 0x0)
        github.com/ethereum/go-ethereum/eth/downloader/statesync.go:534 +0x170
github.com/ethereum/go-ethereum/eth/downloader.(*stateSync).loop(0xc0d8fe6aa0, 0x0, 0x0)
        github.com/ethereum/go-ethereum/eth/downloader/statesync.go:400 +0x527
github.com/ethereum/go-ethereum/eth/downloader.(*stateSync).run(0xc0d8fe6aa0)
        github.com/ethereum/go-ethereum/eth/downloader/statesync.go:320 +0xde
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).runStateSync
        github.com/ethereum/go-ethereum/eth/downloader/statesync.go:114 +0x1ef

Original issue link: ethereum/go-ethereum#23626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant