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

balance visitor assertion failure #1280

rkeene opened this issue Oct 9, 2018 · 0 comments


None yet
2 participants
Copy link

commented Oct 9, 2018

After pull request #1254, block_source() is called from within announce_votes() on old elections. The elections may reference the source block for a chain that has had a rollback leading to an assertion failure in the balance visitor.

(gdb) bt            
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51                                                
#1  0x00007ffff569742a in __GI_abort () at abort.c:89                                                                    
#2  0x00007ffff568ee67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5555596d4d20 "block != nullptr", file=file@entry=0x5555596d4800 "/home/rkeene/devel/raiblocks/rai/secure/common.cpp", line=line@entry=554, function=function@entry=0x5555596db5a0 <rai::balance_visitor::compute(rai::uint256_union const&)::__PRETTY_FUNCTION__> "void rai::balance_visitor::compute(const block_hash&)") at assert.c:92
#3  0x00007ffff568ef12 in __GI___assert_fail (assertion=0x5555596d4d20 "block != nullptr", file=0x5555596d4800 "/home/rkeene/devel/raiblocks/rai/secure/common.cpp", line=554, function=0x5555596db5a0 <rai::balance_visitor::compute(rai::uint256_union const&)::__PRETTY_FUNCTION__> "void rai::balance_visitor::compute(const block_hash&)") at assert.c:101                                                               
#4  0x00005555589a9a4c in rai::balance_visitor::compute (this=0x7fdff02470f0, block_hash=...) at /home/rkeene/devel/raiblocks/rai/secure/common.cpp:554
#5  0x0000555558a0d8d9 in rai::ledger::balance (this=0x62400000a440, transaction_a=..., hash_a=...) at /home/rkeene/devel/raiblocks/rai/secure/ledger.cpp:614
#6  0x0000555558a10c0e in rai::ledger::is_send (this=0x62400000a440, transaction_a=..., block_a=...) at /home/rkeene/devel/raiblocks/rai/secure/ledger.cpp:699
#7  0x0000555558a112ca in rai::ledger::block_source (this=0x62400000a440, transaction_a=..., block_a=...) at /home/rkeene/devel/raiblocks/rai/secure/ledger.cpp:729
#8  0x0000555558203fb9 in rai::active_transactions::announce_votes (this=0x62400000a4d8) at /home/rkeene/devel/raiblocks/rai/node/node.cpp:3973
#9  0x0000555558206d16 in rai::active_transactions::announce_loop (this=0x62400000a4d8) at /home/rkeene/devel/raiblocks/rai/node/node.cpp:4105

@rkeene rkeene added this to the V17.0 milestone Oct 9, 2018

SergiySW added a commit to SergiySW/raiblocks that referenced this issue Oct 9, 2018

Fix escalation source block check
If previous block not existing/not commited yet, block_source can cause segfault for state blocks
So source check can be done only if previous != nullptr or previous is 0 (open account)

@rkeene rkeene closed this in #1282 Oct 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.