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

Wallet crashes repeatedly around voting time #619

Open
walkjivefly opened this issue Jan 16, 2022 · 3 comments
Open

Wallet crashes repeatedly around voting time #619

walkjivefly opened this issue Jan 16, 2022 · 3 comments
Labels

Comments

@walkjivefly
Copy link

Multiple users have reported the wallet gets "crashy" around voting time. It seems to crash every time a stake is won. The behaviour persists from the first stake after voting in a superblock until some time after the relevant superblock.

If the stake involves servicenode collateral then the node also goes offline until the wallet is restarted and the node re-registered.

Wallets should not crash around voting time, or any other time, when a stake is won.

Not all users are affected. I personally have only been affected since adding some multisig addresses to my wallet. Others with similar wallets don't appear to be affected.

Blocknet Daemon version v4.3.3.0-8eef7c789

MX-Linux 19.x

There are no clues in the debug.log. I compiled a wallet with debug enabled and captured a core dump. The backtrace shows

Core was generated by `blocknetd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005565269f3db3 in gov::RevoteOnStake (
    stakedHeight=@0x7f833a0f1990: 2329652, utxo=..., key=..., stakeUtxo=..., 
    wallet=wallet@entry=0x556564c7fd10, tx=..., params=...)
    at /home/mark/src/blocknet/depends/x86_64-pc-linux-gnu/share/../include/boost/variant/variant.hpp:2426
2426	    apply_visitor(Visitor& visitor)
[Current thread is 1 (Thread 0x7f833a0f2700 (LWP 31827))]
(gdb) bt
#0  0x00005565269f3db3 in gov::RevoteOnStake (
    stakedHeight=@0x7f833a0f1990: 2329652, utxo=..., key=..., stakeUtxo={...}, 
    wallet=wallet@entry=0x556564c7fd10, 
    tx=std::shared_ptr<const CTransaction> (empty) = {...}, params=...)
    at /home/mark/src/blocknet/depends/x86_64-pc-linux-gnu/share/../include/boost/variant/variant.hpp:2426
#1  0x0000556526a38b4a in BlockAssembler::CreateNewBlockPoS (
    this=this@entry=0x7f833a0f1920, stakeInput=..., stakeBlockHash=..., 
    stakeTime=@0x7f83f406cf10: 1642341470, 
    blockTime=@0x7f83f406cf18: 1642341456, keystore=<optimized out>, 
    disableValidationChecks=<optimized out>) at ./chainparams.h:60
#2  0x0000556526ae9ffc in StakeMgr::StakeBlock (this=<optimized out>, 
    stakeCoin=..., chainparams=...)
    at /usr/include/c++/8/bits/shared_ptr_base.h:1018
#3  0x0000556526aedf56 in StakeMgr::TryStake (this=0x7f83f4001400, 
    tip=<optimized out>, chainparams=...) at stakemgr.cpp:142
#4  0x0000556526af04f1 in ThreadStakeMinter ()
    at /usr/include/c++/8/bits/unique_ptr.h:342
#5  0x0000556526e3f8fb in thread_proxy ()
#6  0x00007f842d8bdfa3 in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007f842d4bc4cf in clone () from /lib/x86_64-linux-gnu/libc.so.6
@walkjivefly
Copy link
Author

walkjivefly commented Dec 15, 2022

Had a bunch more of these after voting in the last few days as SB approached. We should make this a high priority problem to fix when we manage to acquire a new C++ dev.

@shrnkld shrnkld added the bug label Dec 15, 2022
@walkjivefly
Copy link
Author

Although these crashes are an effective way to disable a servicenode, they can happen regardless of whether the afflicted wallet has any servicenodes configured.

@ConanMishler
Copy link
Contributor

I've noticed my staking wallet crashes consistently when the following two conditions are present:

  1. My wallet is staking
  2. I recently voted

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

No branches or pull requests

3 participants