duality-solutions / Sequence

Sequence(SEQ)
https://duality.solutions
MIT License
17 stars 8 forks source link

sequenced segfaults when launched with -disablewallet #131

Closed BloodyNora closed 5 years ago

BloodyNora commented 5 years ago

Describe the issue

sequenced segfaults when launched with -disablewallet

Steps to reproduce

Run sequenced with -disablewallet, or add disablewallet=1 to ~/.sequence/sequence.conf

Actual behavior

# sequenced -disablewallet
Segmentation fault

debug.log:

[...]
2018-10-26 08:22:02 dnsseed thread start
2018-10-26 08:22:02 init message: Done loading
2018-10-26 08:22:02 opencon thread start
2018-10-26 08:22:02 addcon thread start
2018-10-26 08:22:02 msghand thread start
2018-10-26 08:22:02 net thread start
2018-10-26 08:22:02 receive version message: Sequence:1.1.0: version 70000, blocks=1037742, us=95.216.104.210:16662, peer=1, peeraddr=142.44.164.127:54381
2018-10-26 08:22:02 receive version message: Sequence:1.1.0: version 70000, blocks=1037742, us=[2a01:4f9:2a:d85:95:216:104:210]:16662, peer=2, peeraddr=[2a01:4f9:c010:2187::1]:56630
2018-10-26 08:22:02 receive version message: Sequence:1.1.0: version 70000, blocks=1037742, us=95.216.104.210:16662, peer=3, peeraddr=95.216.169.129:54882
2018-10-26 08:22:02 receive version message: Sequence:1.1.0: version 70000, blocks=1037742, us=95.216.104.210:16662, peer=4, peeraddr=118.31.23.231:58995
2018-10-26 08:22:02 ThreadStakeMinter started
2018-10-26 08:22:02 CPUMiner started for proof-of-stake
2018-10-26 08:23:53 AppInit2: parameter interaction: -proxy set -> setting -upnp=0
2018-10-26 08:23:53 AppInit2: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-10-26 08:23:53 

What platform are you using (Linux, Windows, Mac)

Debian 9.5, Linux 4.9

AmirAbrams commented 5 years ago

@BloodyNora , The segfault occurred because the wallet is trying to start the staker thread without a wallet. In the https://github.com/duality-solutions/Sequence/commit/7847e0e55ccbc9dd55c08dd117ef798d1376ab86 commit should fix the issue. It adds a check to make sure the wallet is not disabled before starting the staker thread.

AmirAbrams commented 5 years ago

@BloodyNora , thanks for reporting the issue. I am closing it and opened a pull request that should fix the segfault. Please redirect any comments to pull request https://github.com/duality-solutions/Sequence/pull/132