hyperledger / hyperledger/fabric

Panic on leveldb

Open
#5,001 1 comment 2 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

### Description

Sometimes, when load is heavy on the peers, the peer crashes with the following error:

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

goroutine 9216936 [running]:
[github.com/syndtr/goleveldb/leveldb.(*dbIter).Release(0xc00c41dd40)](https://github.com/syndtr/goleveldb/leveldb.(*dbIter).Release(0xc00c41dd40))
/vendor/[github.com/syndtr/goleveldb/leveldb/db_iter.go:352](https://github.com/syndtr/goleveldb/leveldb/db_iter.go:352) +0x118
[github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/stateleveldb.(*kvScanner).Close(0x0?)](https://github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/stateleveldb.(*kvScanner).Close(0x0?))
/core/ledger/kvledger/txmgmt/statedb/stateleveldb/stateleveldb.go:338 +0x1c
[github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr.(*resultsItr).Close(...)](https://github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr.(*resultsItr).Close(...))
/core/ledger/kvledger/txmgmt/txmgr/query_executor.go:495
```

### Steps to reproduce

It's hard to reproduce it since it happens with a lot of load, 300tps/second with chaincode that has custom logic and most likely needs optimization.

But the conditions are:
- High load on the peers
- State db (leveldb) under stress
- Chaincode as a service in Kubernetes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.