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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/leveldb/table/reader.go:835 +0x1a5
github.com/syndtr/goleveldb/leveldb/table.(*Reader).Find(...)
        github.com/syndtr/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/leveldb/table.go:450 +0x150
github.com/syndtr/goleveldb/leveldb.(*version).get.func1(0x5, 0xc03df6a870, 0x20)
        github.com/syndtr/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/leveldb/version.go:180 +0x465
github.com/syndtr/goleveldb/leveldb.(*version).walkOverlapping(0xc127a5cc60, 0x0, 0x0, 0x0, 0xc0ff4e6240, 0x28, 0x28, 0xc0e4e893b8, 0xc0e4e89388)
        github.com/syndtr/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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/goleveldb@v1.0.1-0.20210305035536-64b5b1c73954/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