quorum icon indicating copy to clipboard operation
quorum copied to clipboard

panic: runtime error: invalid memory address or nil pointer dereference

Open drandreaskrueger opened this issue 8 years ago • 26 comments

TLDR:

quorum geth crashes:

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

when running 7nodes example on host machine.

System information

geth version
Geth
Version: 1.7.2-stable
Git Commit: ee498061b5a74bf1f3290139a53840345fa038cb
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.9.3
Operating System: linux

I have tried both

git checkout tags/v2.0.1

and

git checkout tags/v2.0.2

Both result in the same error behavior below.

For details how I compiled it, see quorum-examples/non-vagrant/README.md

Expected behaviour

That raft consensus 7nodes are starting up, exactly like in the vagrant virtualbox 7nodes example.

@jpmsam had suggested to me, to run quorum outside of vagrant (like in the 7nodes example), for TPS speed improvements.

Actual behaviour

qdata/1.log

nohup: appending output to 'nohup.out'
INFO [04-23|10:48:57] Starting peer-to-peer node               instance=Geth/v1.7.2-stable-df4267a2/linux-amd64/go1.9.3
[...]
2018-04-23 10:48:59.905833 I | rafthttp: added peer 6
2018-04-23 10:48:59.905860 I | rafthttp: starting peer 7...
2018-04-23 10:48:59.905873 I | rafthttp: started HTTP pipelining with peer 7
2018-04-23 10:48:59.906302 I | rafthttp: started peer 7
2018-04-23 10:48:59.906336 I | rafthttp: added peer 7
raft2018/04/23 10:48:59 INFO: 1 became follower at term 0
raft2018/04/23 10:48:59 INFO: newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft2018/04/23 10:48:59 INFO: 1 became follower at term 1
2018-04-23 10:48:59.906940 I | rafthttp: started streaming with peer 6 (writer)
2018-04-23 10:48:59.906975 I | rafthttp: started streaming with peer 6 (writer)
INFO [04-23|10:48:59] Blockchain manager stopped 
INFO [04-23|10:48:59] Stopping Ethereum protocol 
2018-04-23 10:48:59.907992 I | rafthttp: started streaming with peer 6 (stream MsgApp v2 reader)
2018-04-23 10:48:59.908070 I | rafthttp: started streaming with peer 6 (stream Message reader)
2018-04-23 10:48:59.908114 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 10:48:59.908123 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 10:48:59.908136 I | rafthttp: started streaming with peer 7 (stream MsgApp v2 reader)
2018-04-23 10:48:59.908196 I | rafthttp: started streaming with peer 7 (stream Message reader)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4ef0]

goroutine 288 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc420f67080)
	/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:417 +0x330
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

qdata/2.log

nohup: appending output to 'nohup.out'
INFO [04-23|10:48:57] Starting peer-to-peer node               instance=Geth/v1.7.2-stable-df4267a2/linux-amd64/go1.9.3
[...]
2018-04-23 10:48:59.887429 I | rafthttp: added peer 7
raft2018/04/23 10:48:59 INFO: 2 became follower at term 0
raft2018/04/23 10:48:59 INFO: newRaft 2 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft2018/04/23 10:48:59 INFO: 2 became follower at term 1
2018-04-23 10:48:59.887453 I | rafthttp: started streaming with peer 7 (stream MsgApp v2 reader)
2018-04-23 10:48:59.887518 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 10:48:59.887560 I | rafthttp: started streaming with peer 7 (stream Message reader)
2018-04-23 10:48:59.887615 I | rafthttp: started streaming with peer 7 (writer)
INFO [04-23|10:48:59] Blockchain manager stopped 
INFO [04-23|10:48:59] stopping raft protocol handler... 
2018-04-23 10:48:59.888434 I | rafthttp: stopping peer 1...
2018-04-23 10:48:59.888442 I | rafthttp: stopped streaming with peer 1 (writer)
[...]
2018-04-23 10:48:59.889374 I | rafthttp: stopped peer 7
2018-04-23 10:48:59.889378 I | rafthttp: removed peer 7
INFO [04-23|10:48:59] raft protocol handler stopped 
INFO [04-23|10:48:59] ignoring expected ConfChangeAddNode for initial peer raft id=1
INFO [04-23|10:48:59] start snapshot                           applied index=0 last snapshot index=0
INFO [04-23|10:48:59] Database closed                          database=/quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata
INFO [04-23|10:48:59] Raft stopped 
INFO [04-23|10:48:59] Stopping Ethereum protocol 
INFO [04-23|10:48:59] Ethereum protocol stopped 
INFO [04-23|10:48:59] Transaction pool stopped 
ERROR[04-23|10:48:59] Failed to close database                 database=/quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata err="leveldb: closed"
Fatal: Error starting protocol stack: listen unix /quorum-examples/examples/7nodes/qdata/dd2/geth.ipc: bind: invalid argument

Steps to reproduce the behaviour

Follow the detailed walk through in

https://github.com/drandreaskrueger/quorum-examples/blob/master/non-vagrant/README.md

System is Debian

uname -a
Linux ... 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

Backtrace

? how ?

drandreaskrueger avatar Apr 23 '18 10:04 drandreaskrueger

full log files

new attempt, same error message, but in different nodes than before:

3.log (and ~ 5.log)

nohup: appending output to 'nohup.out'
WARN [04-23|11:24:32] No etherbase set and no accounts found as default 
INFO [04-23|11:24:32] Starting peer-to-peer node               instance=Geth/v1.7.2-stable-ee498061/linux-amd64/go1.9.3
INFO [04-23|11:24:32] Allocated cache and file handles         database=..../quorum-examples/examples/7nodes/qdata/dd3/geth/chaindata cache=128 handles=1024
WARN [04-23|11:24:32] Upgrading database to use lookup entries 
INFO [04-23|11:24:32] Initialised chain configuration          config="{ChainID: 1 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: <nil> EIP158: <nil> Byzantium: <nil> IsQuorum: true Engine: unknown}"
INFO [04-23|11:24:32] Disk storage enabled for ethash caches   dir=..../quorum-examples/examples/7nodes/qdata/dd3/geth/ethash count=3
INFO [04-23|11:24:32] Disk storage enabled for ethash DAGs     dir=/home/akrueger/.ethash                                                                                                   count=2
INFO [04-23|11:24:32] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [04-23|11:24:32] Loaded most recent local header          number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Loaded most recent local full block      number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Loaded most recent local fast block      number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Regenerated local transaction journal    transactions=0 accounts=0
INFO [04-23|11:24:32] Database deduplication successful        deduped=0
INFO [04-23|11:24:32] Starting P2P networking 
INFO [04-23|11:24:34] UDP listener up                          self=enode://579f786d4e2830bbcc02815a27e8a9bacccc9605df4dc6f20bcc1a6eb391e7225fff7cb83e5b4ecd1f3a94d8b733803f2f66b7e871961e7b029e22c155c3a778@[::]:21002
INFO [04-23|11:24:34] starting raft protocol handler 
INFO [04-23|11:24:34] loaded the latest applied index          lastAppliedIndex=0
INFO [04-23|11:24:34] replaying WAL 
INFO [04-23|11:24:34] RLPx listener up                         self=enode://579f786d4e2830bbcc02815a27e8a9bacccc9605df4dc6f20bcc1a6eb391e7225fff7cb83e5b4ecd1f3a94d8b733803f2f66b7e871961e7b029e22c155c3a778@[::]:21002
WARN [04-23|11:24:34] Removing static dial candidate           id=579f786d4e2830bb addr=127.0.0.1:21002 err="is self"
INFO [04-23|11:24:34] loading WAL                              term=0 index=0
INFO [04-23|11:24:34] startRaft                                raft ID=3
INFO [04-23|11:24:34] starting a new raft log                  initial cluster size of=7
2018-04-23 11:24:34.659343 I | rafthttp: starting peer 1...
2018-04-23 11:24:34.659380 I | rafthttp: started HTTP pipelining with peer 1
2018-04-23 11:24:34.661097 I | rafthttp: started streaming with peer 1 (writer)
2018-04-23 11:24:34.661217 I | rafthttp: started streaming with peer 1 (writer)
2018-04-23 11:24:34.661596 I | rafthttp: started peer 1
2018-04-23 11:24:34.661611 I | rafthttp: added peer 1
2018-04-23 11:24:34.661633 I | rafthttp: starting peer 2...
2018-04-23 11:24:34.661641 I | rafthttp: started HTTP pipelining with peer 2
2018-04-23 11:24:34.663330 I | rafthttp: started peer 2
2018-04-23 11:24:34.663350 I | rafthttp: added peer 2
2018-04-23 11:24:34.663483 I | rafthttp: started streaming with peer 2 (writer)
2018-04-23 11:24:34.663527 I | rafthttp: started streaming with peer 2 (writer)
2018-04-23 11:24:34.663593 I | rafthttp: started streaming with peer 2 (stream MsgApp v2 reader)
2018-04-23 11:24:34.663784 I | rafthttp: started streaming with peer 2 (stream Message reader)
2018-04-23 11:24:34.663918 I | rafthttp: starting peer 4...
2018-04-23 11:24:34.663934 I | rafthttp: started HTTP pipelining with peer 4
2018-04-23 11:24:34.664943 I | rafthttp: started streaming with peer 1 (stream MsgApp v2 reader)
2018-04-23 11:24:34.665085 I | rafthttp: started streaming with peer 4 (writer)
2018-04-23 11:24:34.665112 I | rafthttp: started streaming with peer 4 (writer)
2018-04-23 11:24:34.665542 I | rafthttp: started peer 4
2018-04-23 11:24:34.665565 I | rafthttp: added peer 4
2018-04-23 11:24:34.665593 I | rafthttp: starting peer 5...
2018-04-23 11:24:34.665630 I | rafthttp: started HTTP pipelining with peer 5
2018-04-23 11:24:34.667532 I | rafthttp: started peer 5
2018-04-23 11:24:34.667558 I | rafthttp: added peer 5
2018-04-23 11:24:34.667689 I | rafthttp: started streaming with peer 4 (stream MsgApp v2 reader)
2018-04-23 11:24:34.667894 I | rafthttp: started streaming with peer 4 (stream Message reader)
2018-04-23 11:24:34.668401 I | rafthttp: starting peer 6...
2018-04-23 11:24:34.668419 I | rafthttp: started HTTP pipelining with peer 6
2018-04-23 11:24:34.669744 I | rafthttp: started peer 6
2018-04-23 11:24:34.669762 I | rafthttp: added peer 6
2018-04-23 11:24:34.669791 I | rafthttp: starting peer 7...
2018-04-23 11:24:34.669811 I | rafthttp: started HTTP pipelining with peer 7
2018-04-23 11:24:34.670649 I | rafthttp: started peer 7
2018-04-23 11:24:34.670670 I | rafthttp: added peer 7
raft2018/04/23 11:24:34 INFO: 3 became follower at term 0
raft2018/04/23 11:24:34 INFO: newRaft 3 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft2018/04/23 11:24:34 INFO: 3 became follower at term 1
2018-04-23 11:24:34.674728 I | rafthttp: started streaming with peer 1 (stream Message reader)
2018-04-23 11:24:34.679736 I | rafthttp: started streaming with peer 5 (writer)
2018-04-23 11:24:34.679749 I | rafthttp: started streaming with peer 5 (writer)
2018-04-23 11:24:34.679769 I | rafthttp: started streaming with peer 5 (stream MsgApp v2 reader)
2018-04-23 11:24:34.679893 I | rafthttp: started streaming with peer 5 (stream Message reader)
2018-04-23 11:24:34.679963 I | rafthttp: started streaming with peer 6 (writer)
2018-04-23 11:24:34.679972 I | rafthttp: started streaming with peer 6 (writer)
2018-04-23 11:24:34.679985 I | rafthttp: started streaming with peer 6 (stream MsgApp v2 reader)
2018-04-23 11:24:34.680043 I | rafthttp: started streaming with peer 6 (stream Message reader)
INFO [04-23|11:24:34] Blockchain manager stopped 
INFO [04-23|11:24:34] Stopping Ethereum protocol 
2018-04-23 11:24:34.680453 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 11:24:34.680471 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 11:24:34.680487 I | rafthttp: started streaming with peer 7 (stream MsgApp v2 reader)
2018-04-23 11:24:34.680594 I | rafthttp: started streaming with peer 7 (stream Message reader)
INFO [04-23|11:24:34] Ethereum protocol stopped 
INFO [04-23|11:24:34] Transaction pool stopped 
INFO [04-23|11:24:34] Database closed                          database=..../quorum-examples/examples/7nodes/qdata/dd3/geth/chaindata
INFO [04-23|11:24:34] stopping raft protocol handler... 
2018-04-23 11:24:34.680820 I | rafthttp: stopping peer 1...
2018-04-23 11:24:34.680831 I | rafthttp: stopped streaming with peer 1 (writer)
2018-04-23 11:24:34.680836 I | rafthttp: stopped streaming with peer 1 (writer)
2018-04-23 11:24:34.680886 I | rafthttp: stopped HTTP pipelining with peer 1
2018-04-23 11:24:34.680896 I | rafthttp: stopped streaming with peer 1 (stream MsgApp v2 reader)
2018-04-23 11:24:34.680902 I | rafthttp: stopped streaming with peer 1 (stream Message reader)
2018-04-23 11:24:34.680913 I | rafthttp: stopped peer 1
2018-04-23 11:24:34.680931 I | rafthttp: removed peer 1
2018-04-23 11:24:34.680936 I | rafthttp: stopping peer 2...
2018-04-23 11:24:34.680942 I | rafthttp: stopped streaming with peer 2 (writer)
2018-04-23 11:24:34.680948 I | rafthttp: stopped streaming with peer 2 (writer)
2018-04-23 11:24:34.680969 I | rafthttp: stopped HTTP pipelining with peer 2
2018-04-23 11:24:34.680977 I | rafthttp: stopped streaming with peer 2 (stream MsgApp v2 reader)
2018-04-23 11:24:34.680984 I | rafthttp: stopped streaming with peer 2 (stream Message reader)
2018-04-23 11:24:34.680988 I | rafthttp: stopped peer 2
2018-04-23 11:24:34.680994 I | rafthttp: removed peer 2
2018-04-23 11:24:34.680998 I | rafthttp: stopping peer 4...
2018-04-23 11:24:34.681016 I | rafthttp: stopped streaming with peer 4 (writer)
2018-04-23 11:24:34.681023 I | rafthttp: stopped streaming with peer 4 (writer)
2018-04-23 11:24:34.681071 I | rafthttp: stopped HTTP pipelining with peer 4
2018-04-23 11:24:34.681079 I | rafthttp: stopped streaming with peer 4 (stream MsgApp v2 reader)
2018-04-23 11:24:34.681084 I | rafthttp: stopped streaming with peer 4 (stream Message reader)
2018-04-23 11:24:34.681088 I | rafthttp: stopped peer 4
2018-04-23 11:24:34.681093 I | rafthttp: removed peer 4
2018-04-23 11:24:34.681097 I | rafthttp: stopping peer 5...
2018-04-23 11:24:34.681102 I | rafthttp: stopped streaming with peer 5 (writer)
2018-04-23 11:24:34.681106 I | rafthttp: stopped streaming with peer 5 (writer)
2018-04-23 11:24:34.681118 I | rafthttp: stopped HTTP pipelining with peer 5
2018-04-23 11:24:34.681123 I | rafthttp: stopped streaming with peer 5 (stream MsgApp v2 reader)
2018-04-23 11:24:34.681128 I | rafthttp: stopped streaming with peer 5 (stream Message reader)
2018-04-23 11:24:34.681131 I | rafthttp: stopped peer 5
2018-04-23 11:24:34.681135 I | rafthttp: removed peer 5
2018-04-23 11:24:34.681138 I | rafthttp: stopping peer 6...
2018-04-23 11:24:34.681143 I | rafthttp: stopped streaming with peer 6 (writer)
2018-04-23 11:24:34.681147 I | rafthttp: stopped streaming with peer 6 (writer)
2018-04-23 11:24:34.681585 I | rafthttp: stopped HTTP pipelining with peer 6
2018-04-23 11:24:34.681596 I | rafthttp: stopped streaming with peer 6 (stream MsgApp v2 reader)
2018-04-23 11:24:34.681601 I | rafthttp: stopped streaming with peer 6 (stream Message reader)
2018-04-23 11:24:34.681605 I | rafthttp: stopped peer 6
2018-04-23 11:24:34.681609 I | rafthttp: removed peer 6
2018-04-23 11:24:34.681614 I | rafthttp: stopping peer 7...
2018-04-23 11:24:34.681619 I | rafthttp: stopped streaming with peer 7 (writer)
2018-04-23 11:24:34.681623 I | rafthttp: stopped streaming with peer 7 (writer)
2018-04-23 11:24:34.681641 I | rafthttp: stopped HTTP pipelining with peer 7
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4902]

goroutine 245 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc420f3f0c0)
	..../jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:416 +0x302
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	..../jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

1.log (~ 2.log ~ 4.log ~ 6.log ~ 7.log)

nohup: appending output to 'nohup.out'
INFO [04-23|11:24:32] Starting peer-to-peer node               instance=Geth/v1.7.2-stable-ee498061/linux-amd64/go1.9.3
INFO [04-23|11:24:32] Allocated cache and file handles         database=..../quorum-examples/examples/7nodes/qdata/dd1/geth/chaindata cache=128 handles=1024
WARN [04-23|11:24:32] Upgrading database to use lookup entries 
INFO [04-23|11:24:32] Initialised chain configuration          config="{ChainID: 1 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: <nil> EIP158: <nil> Byzantium: <nil> IsQuorum: true Engine: unknown}"
INFO [04-23|11:24:32] Database deduplication successful        deduped=0
INFO [04-23|11:24:32] Disk storage enabled for ethash caches   dir=..../quorum-examples/examples/7nodes/qdata/dd1/geth/ethash count=3
INFO [04-23|11:24:32] Disk storage enabled for ethash DAGs     dir=/home/akrueger/.ethash                                                                                                   count=2
INFO [04-23|11:24:32] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [04-23|11:24:32] Loaded most recent local header          number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Loaded most recent local full block      number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Loaded most recent local fast block      number=0 hash=c23b4e…8b1b71 td=0
INFO [04-23|11:24:32] Regenerated local transaction journal    transactions=0 accounts=0
INFO [04-23|11:24:32] Starting P2P networking 
INFO [04-23|11:24:34] UDP listener up                          self=enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@[::]:21000
INFO [04-23|11:24:34] starting raft protocol handler 
INFO [04-23|11:24:34] loaded the latest applied index          lastAppliedIndex=0
INFO [04-23|11:24:34] replaying WAL 
INFO [04-23|11:24:34] RLPx listener up                         self=enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@[::]:21000
WARN [04-23|11:24:34] Removing static dial candidate           id=ac6b1096ca56b9f6 addr=127.0.0.1:21000 err="is self"
INFO [04-23|11:24:34] loading WAL                              term=0 index=0
INFO [04-23|11:24:34] startRaft                                raft ID=1
INFO [04-23|11:24:34] starting a new raft log                  initial cluster size of=7
2018-04-23 11:24:34.594757 I | rafthttp: starting peer 2...
2018-04-23 11:24:34.594902 I | rafthttp: started HTTP pipelining with peer 2
2018-04-23 11:24:34.596477 I | rafthttp: started peer 2
2018-04-23 11:24:34.596505 I | rafthttp: added peer 2
2018-04-23 11:24:34.596533 I | rafthttp: starting peer 3...
2018-04-23 11:24:34.596540 I | rafthttp: started HTTP pipelining with peer 3
2018-04-23 11:24:34.597416 I | rafthttp: started streaming with peer 2 (writer)
2018-04-23 11:24:34.597447 I | rafthttp: started streaming with peer 2 (writer)
2018-04-23 11:24:34.597524 I | rafthttp: started streaming with peer 2 (stream MsgApp v2 reader)
2018-04-23 11:24:34.597758 I | rafthttp: started streaming with peer 2 (stream Message reader)
2018-04-23 11:24:34.597829 I | rafthttp: started streaming with peer 3 (writer)
2018-04-23 11:24:34.597915 I | rafthttp: started streaming with peer 3 (writer)
2018-04-23 11:24:34.598250 I | rafthttp: started peer 3
2018-04-23 11:24:34.598273 I | rafthttp: added peer 3
2018-04-23 11:24:34.598302 I | rafthttp: started streaming with peer 3 (stream MsgApp v2 reader)
2018-04-23 11:24:34.598471 I | rafthttp: starting peer 4...
2018-04-23 11:24:34.598487 I | rafthttp: started HTTP pipelining with peer 4
2018-04-23 11:24:34.598527 I | rafthttp: started streaming with peer 3 (stream Message reader)
2018-04-23 11:24:34.600500 I | rafthttp: started streaming with peer 4 (writer)
2018-04-23 11:24:34.600728 I | rafthttp: started peer 4
2018-04-23 11:24:34.600745 I | rafthttp: added peer 4
2018-04-23 11:24:34.600787 I | rafthttp: starting peer 5...
2018-04-23 11:24:34.600820 I | rafthttp: started HTTP pipelining with peer 5
2018-04-23 11:24:34.601600 I | rafthttp: started streaming with peer 4 (writer)
2018-04-23 11:24:34.601670 I | rafthttp: started streaming with peer 4 (stream MsgApp v2 reader)
2018-04-23 11:24:34.601969 I | rafthttp: started streaming with peer 4 (stream Message reader)
2018-04-23 11:24:34.603176 I | rafthttp: started streaming with peer 5 (writer)
2018-04-23 11:24:34.604541 I | rafthttp: started streaming with peer 5 (writer)
2018-04-23 11:24:34.605405 I | rafthttp: started peer 5
2018-04-23 11:24:34.605464 I | rafthttp: started streaming with peer 5 (stream MsgApp v2 reader)
2018-04-23 11:24:34.605488 I | rafthttp: started streaming with peer 5 (stream Message reader)
2018-04-23 11:24:34.605535 I | rafthttp: added peer 5
2018-04-23 11:24:34.605578 I | rafthttp: starting peer 6...
2018-04-23 11:24:34.605595 I | rafthttp: started HTTP pipelining with peer 6
2018-04-23 11:24:34.606630 I | rafthttp: started streaming with peer 6 (writer)
2018-04-23 11:24:34.606768 I | rafthttp: started streaming with peer 6 (writer)
2018-04-23 11:24:34.607327 I | rafthttp: started peer 6
2018-04-23 11:24:34.607354 I | rafthttp: started streaming with peer 6 (stream MsgApp v2 reader)
2018-04-23 11:24:34.607440 I | rafthttp: added peer 6
2018-04-23 11:24:34.607479 I | rafthttp: starting peer 7...
2018-04-23 11:24:34.607515 I | rafthttp: started HTTP pipelining with peer 7
2018-04-23 11:24:34.613310 I | rafthttp: started streaming with peer 6 (stream Message reader)
2018-04-23 11:24:34.613503 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 11:24:34.613587 I | rafthttp: started streaming with peer 7 (writer)
2018-04-23 11:24:34.613729 I | rafthttp: started peer 7
2018-04-23 11:24:34.613744 I | rafthttp: added peer 7
raft2018/04/23 11:24:34 INFO: 1 became follower at term 0
raft2018/04/23 11:24:34 INFO: newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft2018/04/23 11:24:34 INFO: 1 became follower at term 1
2018-04-23 11:24:34.613839 I | rafthttp: peer 6 became active
2018-04-23 11:24:34.613849 I | rafthttp: established a TCP streaming connection with peer 6 (stream Message reader)
2018-04-23 11:24:34.613864 I | rafthttp: started streaming with peer 7 (stream Message reader)
2018-04-23 11:24:34.614033 I | rafthttp: started streaming with peer 7 (stream MsgApp v2 reader)
2018-04-23 11:24:34.614619 W | rafthttp: lost the TCP streaming connection with peer 6 (stream Message reader)
INFO [04-23|11:24:34] Blockchain manager stopped 
INFO [04-23|11:24:34] Stopping Ethereum protocol 
INFO [04-23|11:24:34] Ethereum protocol stopped 
INFO [04-23|11:24:34] Transaction pool stopped 
INFO [04-23|11:24:34] Database closed                          database=..../quorum-examples/examples/7nodes/qdata/dd1/geth/chaindata
INFO [04-23|11:24:34] stopping raft protocol handler... 
2018-04-23 11:24:34.615148 I | rafthttp: stopping peer 2...
2018-04-23 11:24:34.615176 I | rafthttp: stopped streaming with peer 2 (writer)
2018-04-23 11:24:34.615198 I | rafthttp: stopped streaming with peer 2 (writer)
2018-04-23 11:24:34.615209 I | rafthttp: stopped HTTP pipelining with peer 2
2018-04-23 11:24:34.615241 I | rafthttp: stopped streaming with peer 2 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615248 I | rafthttp: stopped streaming with peer 2 (stream Message reader)
2018-04-23 11:24:34.615253 I | rafthttp: stopped peer 2
2018-04-23 11:24:34.615262 I | rafthttp: removed peer 2
2018-04-23 11:24:34.615266 I | rafthttp: stopping peer 3...
2018-04-23 11:24:34.615272 I | rafthttp: stopped streaming with peer 3 (writer)
2018-04-23 11:24:34.615277 I | rafthttp: stopped streaming with peer 3 (writer)
2018-04-23 11:24:34.615295 I | rafthttp: stopped HTTP pipelining with peer 3
2018-04-23 11:24:34.615323 I | rafthttp: stopped streaming with peer 3 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615360 I | rafthttp: stopped streaming with peer 3 (stream Message reader)
2018-04-23 11:24:34.615374 I | rafthttp: stopped peer 3
2018-04-23 11:24:34.615379 I | rafthttp: removed peer 3
2018-04-23 11:24:34.615383 I | rafthttp: stopping peer 4...
2018-04-23 11:24:34.615390 I | rafthttp: stopped streaming with peer 4 (writer)
2018-04-23 11:24:34.615395 I | rafthttp: stopped streaming with peer 4 (writer)
2018-04-23 11:24:34.615411 I | rafthttp: stopped HTTP pipelining with peer 4
2018-04-23 11:24:34.615418 I | rafthttp: stopped streaming with peer 4 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615424 I | rafthttp: stopped streaming with peer 4 (stream Message reader)
2018-04-23 11:24:34.615427 I | rafthttp: stopped peer 4
2018-04-23 11:24:34.615432 I | rafthttp: removed peer 4
2018-04-23 11:24:34.615436 I | rafthttp: stopping peer 5...
2018-04-23 11:24:34.615443 I | rafthttp: stopped streaming with peer 5 (writer)
2018-04-23 11:24:34.615448 I | rafthttp: stopped streaming with peer 5 (writer)
2018-04-23 11:24:34.615527 I | rafthttp: stopped HTTP pipelining with peer 5
2018-04-23 11:24:34.615537 I | rafthttp: stopped streaming with peer 5 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615542 I | rafthttp: stopped streaming with peer 5 (stream Message reader)
2018-04-23 11:24:34.615550 I | rafthttp: stopped peer 5
2018-04-23 11:24:34.615555 I | rafthttp: removed peer 5
2018-04-23 11:24:34.615559 I | rafthttp: stopping peer 6...
2018-04-23 11:24:34.615566 I | rafthttp: stopped streaming with peer 6 (writer)
2018-04-23 11:24:34.615573 I | rafthttp: stopped streaming with peer 6 (writer)
2018-04-23 11:24:34.615585 I | rafthttp: stopped HTTP pipelining with peer 6
2018-04-23 11:24:34.615592 I | rafthttp: stopped streaming with peer 6 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615601 I | rafthttp: stopped streaming with peer 6 (stream Message reader)
2018-04-23 11:24:34.615605 I | rafthttp: stopped peer 6
2018-04-23 11:24:34.615610 I | rafthttp: removed peer 6
2018-04-23 11:24:34.615614 I | rafthttp: stopping peer 7...
2018-04-23 11:24:34.615621 I | rafthttp: stopped streaming with peer 7 (writer)
2018-04-23 11:24:34.615627 I | rafthttp: stopped streaming with peer 7 (writer)
2018-04-23 11:24:34.615646 I | rafthttp: stopped HTTP pipelining with peer 7
2018-04-23 11:24:34.615654 I | rafthttp: stopped streaming with peer 7 (stream MsgApp v2 reader)
2018-04-23 11:24:34.615667 I | rafthttp: stopped streaming with peer 7 (stream Message reader)
2018-04-23 11:24:34.615671 I | rafthttp: stopped peer 7
2018-04-23 11:24:34.615677 I | rafthttp: removed peer 7
INFO [04-23|11:24:34] raft protocol handler stopped 
ERROR[04-23|11:24:34] Failed to close database                 database=..../quorum-examples/examples/7nodes/qdata/dd1/geth/chaindata err="leveldb: closed"
INFO [04-23|11:24:34] Raft stopped 
INFO [04-23|11:24:34] ignoring expected ConfChangeAddNode for initial peer raft id=1
INFO [04-23|11:24:34] start snapshot                           applied index=0 last snapshot index=0
Fatal: Error starting protocol stack: listen unix ..../quorum-examples/examples/7nodes/qdata/dd1/geth.ipc: bind: invalid argument

constellation1.log

10:24:27 [INFO] Log level is LevelWarn
10:24:27 [WARN] tm.key is too accessible. Please run: chmod 0600 tm.key
10:24:27 [WARN] No TLS certificate or key found; generating tls-client-cert.pem/tls-client-key.pem
10:24:28 [WARN] No TLS certificate or key found; generating tls-server-cert.pem/tls-server-key.pem
10:24:30 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "C6:89:09:A9:1D:DB:49:EB:17:C6:03:15:16:D5:EC:F5:60:3A:0E:94:F7:D7:74:EE:53:31:BF:E3:FF:35:E3:D1:8C:85:E8:F8:EA:11:6B:3B:9E:24:8E:F8:94:7A:FB:62:6E:7E:10:37:16:F5:85:89:A5:AC:DB:BC:61:3E:CD:66" for host 127.0.0.5
10:24:30 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "77:10:16:B1:37:0D:7E:1B:16:AD:8B:B4:3F:75:27:13:98:DE:DD:44:0B:96:FA:94:93:20:40:F0:C3:69:4A:E8:21:A6:F0:A5:02:90:B6:E6:C9:02:05:8D:6F:B2:7F:46:38:E9:75:08:22:B9:90:F0:22:EF:E4:76:E3:85:E0:05" for host 127.0.0.2
10:24:30 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "16:E4:7E:A4:F1:7F:88:4D:4E:15:44:4A:CD:70:0C:21:C2:39:71:E9:40:04:F4:E6:41:94:D3:85:8B:F6:4D:45:B7:9C:4C:09:56:E6:85:9D:B1:E0:69:9D:67:76:42:41:99:72:60:FA:BC:C1:72:96:AB:06:4F:88:D6:B6:93:55" for host 127.0.0.7
10:24:30 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "37:70:46:1E:F2:04:EE:09:1C:AC:BF:B3:16:26:2F:08:66:B2:C5:AE:F3:76:FA:EF:C6:51:3D:E8:38:5B:04:71:C0:48:91:7A:2F:3F:62:F9:42:1B:E0:AF:0B:9F:A0:AA:29:37:11:08:92:3D:EF:EE:75:BC:43:54:F2:CF:F0:F7" for host 127.0.0.5
10:24:31 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "05:77:49:27:FC:76:35:81:CB:2D:BE:B0:B5:78:C2:1E:0B:BC:0B:CB:68:89:FD:9A:F3:6B:59:BA:BE:3D:FA:66:30:09:FB:13:D7:A1:7C:B9:67:E6:FC:D3:44:EC:D5:C0:0E:EE:36:47:2D:B1:73:71:E6:9A:66:CE:66:25:55:06" for host 127.0.0.7
10:24:31 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "A0:44:18:89:B3:F9:3B:E7:FD:B5:8A:66:0A:06:F2:A4:7B:96:20:CA:CF:DA:41:00:D5:D6:78:55:1E:68:3B:8A:F1:CA:C7:04:A6:68:6A:22:79:10:AB:54:C5:9A:B7:D5:58:0F:AD:91:89:7D:E6:7A:42:37:D6:08:5E:1B:B2:3E" for host 127.0.0.2
10:24:31 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "32:45:4C:98:D1:23:DE:97:F3:61:D4:1F:2C:7A:B3:BF:42:AF:B9:D7:F3:7A:F5:8A:D4:D7:D1:81:EF:46:A0:05:53:FA:25:5B:78:DF:95:73:F9:75:CE:35:F7:76:21:B7:62:5D:8D:01:FF:74:DA:DE:40:72:1A:95:94:B1:B2:93" for host 127.0.0.6
10:24:31 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "35:26:4F:94:83:C2:75:93:35:10:3D:9C:C9:D9:F2:7B:5A:A4:EE:81:A7:AF:07:21:5E:2A:7F:33:84:55:2D:0A:25:A1:11:84:41:B9:09:93:A7:09:B6:6B:77:EA:96:AF:CB:84:74:71:38:05:6F:4A:25:EB:DE:6D:C9:38:B3:4F" for host 127.0.0.3
10:24:32 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "74:B3:2C:10:53:BB:0A:68:9B:F3:8F:B8:FD:E4:99:36:AD:12:DD:2E:F5:83:64:A4:3D:BE:83:6E:02:97:0F:00:45:15:2E:45:24:C8:A8:0A:B1:DF:1B:14:56:C3:27:4D:FB:4B:37:B7:3A:69:8E:93:78:E3:2E:83:0A:BF:91:64" for host 127.0.0.3
10:24:32 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "FC:DB:16:88:CE:A0:F7:74:51:82:3F:37:16:5C:99:E9:9B:AE:86:5D:B1:58:6D:95:C5:3D:07:B4:6B:70:C0:1C:97:AE:97:BC:E5:8D:F7:A2:15:20:89:A9:5C:48:CB:32:9A:5A:3B:E9:36:7D:28:A1:EE:44:0D:65:A0:21:0F:A4" for host 127.0.0.6
10:24:32 [WARN] tls-known-clients (ca-or-tofu trust mode): Adding new fingerprint "DC:6E:6D:07:06:5F:9E:16:61:80:D6:5E:90:30:ED:8B:28:E3:72:87:8E:69:03:45:EC:D9:98:14:0C:57:5F:6F:41:6C:D8:E3:45:C5:05:8E:F3:D4:0F:2A:54:96:16:FF:DC:B1:E2:45:F2:16:25:08:69:23:01:68:5D:02:0A:9D" for host 127.0.0.4
10:24:33 [WARN] tls-known-servers (ca-or-tofu trust mode): Adding new fingerprint "43:9F:C4:EE:9B:12:17:14:D7:3F:77:40:A7:A4:77:AA:9A:75:85:47:86:F9:58:C4:DC:86:97:90:3B:FC:18:64:39:DE:FB:54:15:9B:2C:FF:18:50:A7:23:5E:86:1F:19:77:34:97:8F:9F:DF:C4:9A:DF:E7:12:92:C4:95:AE:AF" for host 127.0.0.4

drandreaskrueger avatar Apr 23 '18 10:04 drandreaskrueger

--> anyone any ideas on this?

--> anyone could give it a try to reproduce; and if you do not see the same problem, then on a Debian machine, or Debian Virtualbox?

The full instructions are there, you just need a bit of time to copypaste all those commands.

We need it to possibly improve the upper bounds on TPS rates of quorum v2. Thanks.

drandreaskrueger avatar Apr 24 '18 13:04 drandreaskrueger

I can't reproduce on Ubuntu or Mac OS.

jpmsam avatar Apr 24 '18 17:04 jpmsam

Debian ??

So the problem might be Debian specific?

Perhaps try (in a VirtualBox) with Debian?

Or: How can I generate more debugging information when I reproduce it? Back in the office only on Tuesday though.

Thanks. Andreas

drandreaskrueger avatar Apr 25 '18 18:04 drandreaskrueger

Cant reproduce. I have setup Quorum without the source and without the vagrant on a Ubuntu 16.04 AWS t2.small. Setup was similar to yours.

I ran your script to test the throughput, but got only 50 TPS peak. Trying out different configurations now to test the throughput.

anidhya avatar Apr 26 '18 07:04 anidhya

More debug infos? Debian ?

@anidhya fantastic, thanks a lot for trying this out.

Cant reproduce.

Interesting. But you tried Ubuntu, not Debian - right? Perhaps I must simply reproduce it on my machine then, with some more infos. Will try to get more debugging information, when I am back in the office next week. What can I enable to get more debugging information than this?

low TPS

I ran your script to test the throughput, but got only 50 TPS peak.

Nice one, thanks.

Good to get that confirmed.

Have you tried the multi-threading approaches too?

benchmarking in the cloud

Feel free to fork, and add your results to the log.md; or perhaps better, create a new, similar file, intended to contains all our experiments on AWS machines:

good idea to benchmark it in the cloud. Please also record the peak RAM & CPU consumption.

drandreaskrueger avatar Apr 26 '18 17:04 drandreaskrueger

I can definitely reproduce:

tail qdata/logs/?.log

==> qdata/logs/1.log <==
2018-05-01 09:44:58.621354 I | rafthttp: stopped peer 2
2018-05-01 09:44:58.621359 I | rafthttp: removed peer 2
INFO [05-01|09:44:58] raft protocol handler stopped 
ERROR[05-01|09:44:58] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd1/geth/chaindata err="leveldb: closed"
INFO [05-01|09:44:58] Raft stopped 
INFO [05-01|09:44:58] compacted log                            index=5
INFO [05-01|09:44:58] persisted the latest applied index       index=6
INFO [05-01|09:44:58] ignoring expected ConfChangeAddNode for initial peer raft id=7
INFO [05-01|09:44:58] start snapshot                           applied index=6 last snapshot index=6
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd1/geth.ipc: bind: invalid argument

==> qdata/logs/2.log <==
INFO [05-01|09:44:58] raft protocol handler stopped 
INFO [05-01|09:44:58] Database closed                          database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata
INFO [05-01|09:44:58] Raft stopped 
INFO [05-01|09:44:58] ignoring expected ConfChangeAddNode for initial peer raft id=1
INFO [05-01|09:44:58] start snapshot                           applied index=0 last snapshot index=0
INFO [05-01|09:44:58] Stopping Ethereum protocol 
INFO [05-01|09:44:58] Ethereum protocol stopped 
INFO [05-01|09:44:58] Transaction pool stopped 
ERROR[05-01|09:44:58] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata err="leveldb: closed"
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth.ipc: bind: invalid argument

==> qdata/logs/3.log <==
2018-05-01 09:44:58.641545 I | rafthttp: stopped peer 7
2018-05-01 09:44:58.641548 I | rafthttp: removed peer 7
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4902]

goroutine 296 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc4216f2480)
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:416 +0x302
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

==> qdata/logs/4.log <==
2018-05-01 09:44:58.635327 I | rafthttp: stopped streaming with peer 2 (writer)
2018-05-01 09:44:58.635339 I | rafthttp: stopped HTTP pipelining with peer 2
2018-05-01 09:44:58.635344 I | rafthttp: stopped streaming with peer 2 (stream MsgApp v2 reader)
2018-05-01 09:44:58.635348 I | rafthttp: stopped streaming with peer 2 (stream Message reader)
2018-05-01 09:44:58.635351 I | rafthttp: stopped peer 2
2018-05-01 09:44:58.635355 I | rafthttp: removed peer 2
INFO [05-01|09:44:58] raft protocol handler stopped 
ERROR[05-01|09:44:58] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd4/geth/chaindata err="leveldb: closed"
INFO [05-01|09:44:58] Raft stopped 
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd4/geth.ipc: bind: invalid argument

==> qdata/logs/5.log <==
2018-05-01 09:44:58.628863 I | rafthttp: stopped peer 6
2018-05-01 09:44:58.628866 I | rafthttp: removed peer 6
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4902]

goroutine 291 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc421658640)
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:416 +0x302
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

==> qdata/logs/6.log <==
2018-05-01 09:44:58.599237 I | rafthttp: started streaming with peer 5 (stream MsgApp v2 reader)
2018-05-01 09:44:58.599480 I | rafthttp: started streaming with peer 7 (writer)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4930]

goroutine 272 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc420221280)
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:417 +0x330
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

==> qdata/logs/7.log <==
2018-05-01 09:44:58.633292 I | rafthttp: stopped streaming with peer 1 (writer)
2018-05-01 09:44:58.633319 I | rafthttp: stopped HTTP pipelining with peer 1
2018-05-01 09:44:58.633335 I | rafthttp: stopped streaming with peer 1 (stream MsgApp v2 reader)
2018-05-01 09:44:58.633347 I | rafthttp: stopped streaming with peer 1 (stream Message reader)
2018-05-01 09:44:58.633351 I | rafthttp: stopped peer 1
2018-05-01 09:44:58.633355 I | rafthttp: removed peer 1
INFO [05-01|09:44:58] raft protocol handler stopped 
ERROR[05-01|09:44:58] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd7/geth/chaindata err="leveldb: closed"
INFO [05-01|09:44:58] Raft stopped 
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd7/geth.ipc: bind: invalid argument

If you do not want to also try this on Debian (hey, there is even an AWS Debian AMI !), then:

What exactly can I switch on, to give you more debugging information?

What else can I tell you about my machine?

drandreaskrueger avatar May 01 '18 08:05 drandreaskrueger

my system:

free -m
              total        used        free      shared  buff/cache   available
Mem:          15740        2336       10121         357        3282       12712
Swap:          9687           0        9687

uname -a
Linux ... 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

df
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda1      230467740 157164908  61572656  72% /

Quorum toolchain:

geth version
Geth
Version: 1.7.2-stable
Git Commit: ee498061b5a74bf1f3290139a53840345fa038cb
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.9.3
Operating System: linux

constellation-node --version
Constellation Node 0.3.2

drandreaskrueger avatar May 01 '18 08:05 drandreaskrueger

2.0.2

tried also with the version "2.0.2":

git checkout tags/v2.0.2
make all
...
geth version
Geth
Version: 1.7.2-stable
Git Commit: df4267a25637a5497a3db9fbde4603a3dcd6aa14
Quorum Version: 2.0.1
Architecture: amd64
Network Id: 1
Go Version: go1.9.3
Operating System: linux

Same. Broken.

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

drandreaskrueger avatar May 01 '18 09:05 drandreaskrueger

I have now switched on

-verbosity 5 --pprof debugging information

see raft-start.sh#L12-L18

can you see more here?

tail -n 25 qdata/logs/?.log
==> qdata/logs/1.log <==
DEBUG[05-01|10:08:56] IPC registered *eth.PublicMinerAPI under 'eth' 
DEBUG[05-01|10:08:56] IPC registered *downloader.PublicDownloaderAPI under 'eth' 
DEBUG[05-01|10:08:56] IPC registered *eth.PrivateMinerAPI under 'miner' 
DEBUG[05-01|10:08:56] IPC registered *filters.PublicFilterAPI under 'eth' 
DEBUG[05-01|10:08:56] IPC registered *eth.PrivateAdminAPI under 'admin' 
DEBUG[05-01|10:08:56] IPC registered *eth.PublicDebugAPI under 'debug' 
DEBUG[05-01|10:08:56] IPC registered *eth.PrivateDebugAPI under 'debug' 
DEBUG[05-01|10:08:56] IPC registered *ethapi.PublicNetAPI under 'net' 
DEBUG[05-01|10:08:56] IPC registered *raft.PublicRaftAPI under 'raft' 
DEBUG[05-01|10:08:56] RPC Server shutdown initiatied 
INFO [05-01|10:08:56] Blockchain manager stopped 
INFO [05-01|10:08:56] Stopping Ethereum protocol 
INFO [05-01|10:08:56] Ethereum protocol stopped 
2018-05-01 10:08:56.953876 I | rafthttp: started streaming with peer 7 (stream Message reader)
2018-05-01 10:08:56.953957 I | rafthttp: started streaming with peer 6 (writer)
2018-05-01 10:08:56.953965 I | rafthttp: started streaming with peer 6 (writer)
2018-05-01 10:08:56.953969 I | rafthttp: started streaming with peer 6 (stream MsgApp v2 reader)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4ec2]

goroutine 233 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc42005ec80)
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:416 +0x302
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

==> qdata/logs/2.log <==
2018-05-01 10:08:56.981417 I | rafthttp: stopped streaming with peer 7 (writer)
2018-05-01 10:08:56.981424 I | rafthttp: stopped HTTP pipelining with peer 7
2018-05-01 10:08:56.981429 I | rafthttp: stopped streaming with peer 7 (stream MsgApp v2 reader)
2018-05-01 10:08:56.981433 I | rafthttp: stopped streaming with peer 7 (stream Message reader)
2018-05-01 10:08:56.981436 I | rafthttp: stopped peer 7
2018-05-01 10:08:56.981441 I | rafthttp: removed peer 7
INFO [05-01|10:08:56] raft protocol handler stopped 
INFO [05-01|10:08:56] Database closed                          database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata
INFO [05-01|10:08:56] Raft stopped 
INFO [05-01|10:08:56] Stopping Ethereum protocol 
INFO [05-01|10:08:56] Ethereum protocol stopped 
INFO [05-01|10:08:56] Transaction pool stopped 
ERROR[05-01|10:08:56] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth/chaindata err="leveldb: closed"
DEBUG[05-01|10:08:56] Deleting port mapping                    proto=tcp extport=21001 intport=21001 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:56] Read error                               err="accept tcp [::]:21001: use of closed network connection"
TRACE[05-01|10:08:56] P2P networking is spinning down 
DEBUG[05-01|10:08:56] UDP read error                           err="read udp [::]:21001: use of closed network connection"
DEBUG[05-01|10:08:56] Deleting port mapping                    proto=udp extport=21001 intport=21001 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:56] No discv4 seed nodes found 
DEBUG[05-01|10:08:56] Resolving node failed                    id=3701f007bfa4cb26 newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=3d9ca5956b38557a newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=239c1f044a2b03b6 newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=eacaa74c4b0e7a9e newdelay=2m0s
TRACE[05-01|10:08:56] <-delpeer (spindown)                     id=eacaa74c4b0e7a9e conn=inbound    remainingTasks=5
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd2/geth.ipc: bind: invalid argument

==> qdata/logs/3.log <==
2018-05-01 10:08:56.963641 I | rafthttp: stopped streaming with peer 1 (stream MsgApp v2 reader)
2018-05-01 10:08:56.963645 I | rafthttp: stopped streaming with peer 1 (stream Message reader)
2018-05-01 10:08:56.963649 I | rafthttp: stopped peer 1
2018-05-01 10:08:56.963652 I | rafthttp: removed peer 1
INFO [05-01|10:08:56] raft protocol handler stopped 
ERROR[05-01|10:08:56] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd3/geth/chaindata err="leveldb: closed"
INFO [05-01|10:08:56] Raft stopped 
DEBUG[05-01|10:08:56] Deleting port mapping                    proto=tcp extport=21002 intport=21002 interface="UPnP or NAT-PMP"
INFO [05-01|10:08:56] ignoring expected ConfChangeAddNode for initial peer raft id=1
INFO [05-01|10:08:56] start snapshot                           applied index=0 last snapshot index=0
2018-05-01 10:08:56.964242 E | rafthttp: failed to find member 2 in cluster 1000
TRACE[05-01|10:08:56] Rejected peer                            id=0ba6b9f606a43a95 addr=127.0.0.1:36994                   conn=inbound    err="server stopped"
2018-05-01 10:08:56.974216 E | rafthttp: failed to find member 2 in cluster 1000
TRACE[05-01|10:08:56] Accepted connection                      addr=127.0.0.1:37046
DEBUG[05-01|10:08:56] Read error                               err="accept tcp [::]:21002: use of closed network connection"
TRACE[05-01|10:08:56] P2P networking is spinning down 
DEBUG[05-01|10:08:56] UDP read error                           err="read udp [::]:21002: use of closed network connection"
DEBUG[05-01|10:08:56] Deleting port mapping                    proto=udp extport=21002 intport=21002 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:56] No discv4 seed nodes found 
DEBUG[05-01|10:08:56] Resolving node failed                    id=239c1f044a2b03b6 newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=eacaa74c4b0e7a9e newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=3701f007bfa4cb26 newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=3d9ca5956b38557a newdelay=2m0s
DEBUG[05-01|10:08:56] Resolving node failed                    id=0ba6b9f606a43a95 newdelay=2m0s
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd3/geth.ipc: bind: invalid argument

==> qdata/logs/4.log <==
2018-05-01 10:08:57.009499 I | rafthttp: stopped streaming with peer 6 (writer)
DEBUG[05-01|10:08:57] Executing EVM call finished              runtime=120.124µs
DEBUG[05-01|10:08:57] Release oracle not found                 contract=0xFA7B9770Ca4cb04296Cac84F37736d4041251CDF
DEBUG[05-01|10:08:57] Removing static node                     node="enode://eacaa74c4b0e7a9e12d2fe5fee6595eda841d6d992c35dbbcc50fcee4aa86dfbbdeff7dc7e72c2305d5a62257f82737a8cffc80474c15c611c037f52db1a3a7b@127.0.0.1:21005?discport=0"
2018-05-01 10:08:57.009550 I | rafthttp: stopped HTTP pipelining with peer 6
2018-05-01 10:08:57.009559 I | rafthttp: stopped streaming with peer 6 (stream MsgApp v2 reader)
2018-05-01 10:08:57.009567 I | rafthttp: stopped streaming with peer 6 (stream Message reader)
2018-05-01 10:08:57.009571 I | rafthttp: stopped peer 6
2018-05-01 10:08:57.009575 I | rafthttp: removed peer 6
INFO [05-01|10:08:57] raft protocol handler stopped 
ERROR[05-01|10:08:57] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd4/geth/chaindata err="leveldb: closed"
INFO [05-01|10:08:57] Raft stopped 
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=tcp extport=21003 intport=21003 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] Read error                               err="accept tcp [::]:21003: use of closed network connection"
TRACE[05-01|10:08:57] P2P networking is spinning down 
DEBUG[05-01|10:08:57] UDP read error                           err="read udp [::]:21003: use of closed network connection"
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=udp extport=21003 intport=21003 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] No discv4 seed nodes found 
INFO [05-01|10:08:57] ignoring expected ConfChangeAddNode for initial peer raft id=1
INFO [05-01|10:08:57] start snapshot                           applied index=0 last snapshot index=0
DEBUG[05-01|10:08:57] Resolving node failed                    id=579f786d4e2830bb newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=eacaa74c4b0e7a9e newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=3701f007bfa4cb26 newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=ac6b1096ca56b9f6 newdelay=2m0s
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd4/geth.ipc: bind: invalid argument

==> qdata/logs/5.log <==
DEBUG[05-01|10:08:57] IPC registered *ethapi.PrivateDebugAPI under 'debug' 
DEBUG[05-01|10:08:57] IPC registered *ethapi.PublicAccountAPI under 'eth' 
DEBUG[05-01|10:08:57] IPC registered *ethapi.PrivateAccountAPI under 'personal' 
DEBUG[05-01|10:08:57] IPC registered *eth.PublicEthereumAPI under 'eth' 
DEBUG[05-01|10:08:57] IPC registered *eth.PublicMinerAPI under 'eth' 
DEBUG[05-01|10:08:57] IPC registered *downloader.PublicDownloaderAPI under 'eth' 
DEBUG[05-01|10:08:57] IPC registered *eth.PrivateMinerAPI under 'miner' 
DEBUG[05-01|10:08:57] IPC registered *filters.PublicFilterAPI under 'eth' 
DEBUG[05-01|10:08:57] IPC registered *eth.PrivateAdminAPI under 'admin' 
DEBUG[05-01|10:08:57] IPC registered *eth.PublicDebugAPI under 'debug' 
DEBUG[05-01|10:08:57] IPC registered *eth.PrivateDebugAPI under 'debug' 
DEBUG[05-01|10:08:57] IPC registered *ethapi.PublicNetAPI under 'net' 
DEBUG[05-01|10:08:57] IPC registered *raft.PublicRaftAPI under 'raft' 
DEBUG[05-01|10:08:57] RPC Server shutdown initiatied 
INFO [05-01|10:08:57] Blockchain manager stopped 
INFO [05-01|10:08:57] Stopping Ethereum protocol 
2018-05-01 10:08:57.006419 I | rafthttp: started streaming with peer 7 (stream Message reader)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbd4ef0]

goroutine 266 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc42461e400)
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:417 +0x330
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
	/github/jpmorganchase_quorum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:112 +0x104

==> qdata/logs/6.log <==
2018-05-01 10:08:57.009078 I | rafthttp: stopped streaming with peer 7 (stream MsgApp v2 reader)
2018-05-01 10:08:57.009083 I | rafthttp: stopped streaming with peer 7 (stream Message reader)
2018-05-01 10:08:57.009086 I | rafthttp: stopped peer 7
2018-05-01 10:08:57.009090 I | rafthttp: removed peer 7
2018-05-01 10:08:57.009093 I | rafthttp: stopping peer 1...
2018-05-01 10:08:57.009098 I | rafthttp: stopped streaming with peer 1 (writer)
2018-05-01 10:08:57.009102 I | rafthttp: stopped streaming with peer 1 (writer)
DEBUG[05-01|10:08:57] Removing static node                     node="enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@127.0.0.1:21000?discport=0"
2018-05-01 10:08:57.009122 I | rafthttp: stopped HTTP pipelining with peer 1
2018-05-01 10:08:57.009126 I | rafthttp: stopped streaming with peer 1 (stream MsgApp v2 reader)
2018-05-01 10:08:57.009131 I | rafthttp: stopped streaming with peer 1 (stream Message reader)
2018-05-01 10:08:57.009134 I | rafthttp: stopped peer 1
2018-05-01 10:08:57.009141 I | rafthttp: removed peer 1
INFO [05-01|10:08:57] raft protocol handler stopped 
ERROR[05-01|10:08:57] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd6/geth/chaindata err="leveldb: closed"
INFO [05-01|10:08:57] Raft stopped 
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=tcp extport=21005 intport=21005 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] Read error                               err="accept tcp [::]:21005: use of closed network connection"
TRACE[05-01|10:08:57] P2P networking is spinning down 
DEBUG[05-01|10:08:57] UDP read error                           err="read udp [::]:21005: use of closed network connection"
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=udp extport=21005 intport=21005 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] No discv4 seed nodes found 
DEBUG[05-01|10:08:57] Resolving node failed                    id=579f786d4e2830bb newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=ac6b1096ca56b9f6 newdelay=2m0s
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd6/geth.ipc: bind: invalid argument

==> qdata/logs/7.log <==
2018-05-01 10:08:57.011623 I | rafthttp: stopped peer 5
2018-05-01 10:08:57.011626 I | rafthttp: removed peer 5
2018-05-01 10:08:57.011630 I | rafthttp: stopping peer 6...
2018-05-01 10:08:57.011634 I | rafthttp: stopped streaming with peer 6 (writer)
2018-05-01 10:08:57.011638 I | rafthttp: stopped streaming with peer 6 (writer)
DEBUG[05-01|10:08:57] Removing static node                     node="enode://eacaa74c4b0e7a9e12d2fe5fee6595eda841d6d992c35dbbcc50fcee4aa86dfbbdeff7dc7e72c2305d5a62257f82737a8cffc80474c15c611c037f52db1a3a7b@127.0.0.1:21005?discport=0"
2018-05-01 10:08:57.011691 I | rafthttp: stopped HTTP pipelining with peer 6
2018-05-01 10:08:57.011714 I | rafthttp: stopped streaming with peer 6 (stream MsgApp v2 reader)
2018-05-01 10:08:57.011719 I | rafthttp: stopped streaming with peer 6 (stream Message reader)
2018-05-01 10:08:57.011722 I | rafthttp: stopped peer 6
2018-05-01 10:08:57.011726 I | rafthttp: removed peer 6
INFO [05-01|10:08:57] raft protocol handler stopped 
ERROR[05-01|10:08:57] Failed to close database                 database=/github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd7/geth/chaindata err="leveldb: closed"
INFO [05-01|10:08:57] Raft stopped 
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=tcp extport=21006 intport=21006 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] Read error                               err="accept tcp [::]:21006: use of closed network connection"
TRACE[05-01|10:08:57] P2P networking is spinning down 
DEBUG[05-01|10:08:57] UDP read error                           err="read udp [::]:21006: use of closed network connection"
DEBUG[05-01|10:08:57] Deleting port mapping                    proto=udp extport=21006 intport=21006 interface="UPnP or NAT-PMP"
DEBUG[05-01|10:08:57] No discv4 seed nodes found 
DEBUG[05-01|10:08:57] Resolving node failed                    id=ac6b1096ca56b9f6 newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=eacaa74c4b0e7a9e newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=3701f007bfa4cb26 newdelay=2m0s
DEBUG[05-01|10:08:57] Resolving node failed                    id=3d9ca5956b38557a newdelay=2m0s
Fatal: Error starting protocol stack: listen unix /github/drandreaskrueger_quorum-examples/examples/7nodes/qdata/dd7/geth.ipc: bind: invalid argument

as this bug is crashing the nodes, I cannot access the http://localhost:6060/debug/pprof

drandreaskrueger avatar May 01 '18 09:05 drandreaskrueger

filters.(*EventSystem).eventLoop <--> filter_system.go

The problem appears in

github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc42461e400)

what could be wrong with

/eth/filters/filter_system.go:417

and

eth/filters.NewEventSystem --> /eth/filters/filter_system.go:112

?

That causes

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

@anidhya, @jpmsam - any ideas?

drandreaskrueger avatar May 01 '18 09:05 drandreaskrueger

I tested a Quorum network of 2 nodes on 2 separate t2-minor AWS machines, and the TPS was around 140 on an average. Credits: 7nodes example and @drandreaskrueger for stress-testing script. I posted a medium article to easily set up the test environment and run the tests on it.

vasa-develop avatar May 08 '18 06:05 vasa-develop

140 tps

tested a Quorum network of 2 nodes on 2 separate t2-minor AWS machines

Very nice, thanks, @vasa-develop .

Perhaps that helps to debug the above bug? I doubt it, though. I can try when I find the time.

Any new ideas, @anidhya, @jpmsam ?

(Because Debian?) So far I could only test it in the default 7nodes setup within Vagrant Virtualbox, but your approach is running it on the host machines. Good.

You have used which AMI ? Ubuntu? You seem to be good with AWS - can you instead please quickly try Debian machines instead ==> THAT might help us to debug the above bug in Quorum/Constellation.

the TPS was around 140 on an average.

And yes, approx 140 TPS on average; I have also not been able to push that much higher.

--> no big difference between vagrant versus hostmachine setup?
--> How fast can you get it on AWS with the standard 7nodes vagrant setup?

Perhaps you have had any new ideas & suggestions what could make this faster?

drandreaskrueger avatar May 08 '18 09:05 drandreaskrueger

submodule

Credits: ...

You are doing that here in this comment, yes. Thanks. Please also put credits into the medium article, and your github repos, like this:

benchmarking scripts "chainhammer"
https://gitlab.com/electronDLT/chainhammer
by Dr Andreas Krueger, Electron.org.uk, London

You took our scripts tps.py send.py, and just included them into your repo (and then you dropped our README.md). There are a few reasons, and a better way ... how to do this differently:

  • of course, our company appreciates to be credited for our work
  • the scripts were not ready yet, but:
  • I cannot write-access my scripts in your repo
  • I will keep on updating the benchmarking scripts, probably already today.

For example deploy.py and DeployContractExample.py were still broken, the Web3.py guys have fixed that, so I can repair them today.

Long story short, @vasa-develop, this is better:

--> Please include our repo as a submodule and remove the soon outdated copies of tps.py and send.py and deploy.py and ... (all the other files from our repo). Thanks.

drandreaskrueger avatar May 08 '18 09:05 drandreaskrueger

cooperation

I am really happy you are using my scripts. Let's benchmark the Ethereum world together ;-)

I have identified a list of things that I would do next, if I were given the time, but I am already busy with other things. I suggest we cooperate on this if you want to. Just fork our repo, and do a pull request.

Great stuff. Keep up the good work.

drandreaskrueger avatar May 08 '18 09:05 drandreaskrueger

@drandreaskrueger Sure, I will implement the all of the above.

vasa-develop avatar May 10 '18 05:05 vasa-develop

Hey all, I had a question. Actually, I was trying to execute a contract(you can find the contract here) on Quorum network, but the transactions aren't executed successfully. But, I noticed that if I broke the contract function into multiple small functions, then it worked. My concern is that the function(addAccount) was not that big(only 6 params). Any Idea what has gone wrong here?

Thanks

vasa-develop avatar May 25 '18 15:05 vasa-develop

Hello @vasa-develop

Sorry I cannot help with this.

Hints:

Any Idea what has gone wrong here?

I don't think it is related to this issue #352 here - so what about creating a new issue for your question?

Perhaps you want to then include answers to these questions:

(you can find the contract here)
if I broke the contract function into multiple small functions

Perhaps you also publish your second account.sol ("broke the contract function into multiple small functions") ?

My concern is that the function(addAccount) was not that big(only 6 params).

Perhaps leave out some parameters, make your example code simpler, until the problem disappears? Then you might be able to find the reason & solution yourself.

but the transactions aren't executed successfully.

what error messages did you get?
transaction receipts?

drandreaskrueger avatar May 29 '18 09:05 drandreaskrueger

@drandreaskrueger No problem. I got the solution.

vasa-develop avatar Jun 01 '18 18:06 vasa-develop

Hi, I think it is all related to https://github.com/jpmorganchase/quorum/issues/221 Been trying to compile from the repo, from the latest available release but 'quorum' module is not appearing on geth instance and everything breaks apart when dealing with privateFor. Have any suggestions to overcome suh? Thanks!

nosoccomtothom avatar Jul 02 '18 14:07 nosoccomtothom