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

Assertion (node.network_params.network.is_dev_network ()) failed (beta network) #3313

Closed
dsiganos opened this issue May 27, 2021 · 2 comments

Comments

@dsiganos
Copy link
Contributor

Summary

When I try to run the latest develop on the beta network, I get this assert everytime.
something must be in my ledger or the network because it does not have happen with an empty ledger.
This is the output form nano-node:

Starting up Nano node...
[2021-May-27 21:38:04.079594]: Starting up Nano node...
[2021-May-27 21:38:04.079770]: Open file descriptors limit is 16384
[2021-May-27 21:38:05.456980]: Wallet unlocked
[2021-May-27 21:38:05.457138]: Node starting, version: V22.0
[2021-May-27 21:38:05.457201]: Build information: 4563fb02 "GNU C++ version " "9.3.0" "BOOST 107000" BUILT "May 27 2021"
[2021-May-27 21:38:05.457266]: Database backend: LMDB 0.9.25
[2021-May-27 21:38:05.457304]: Active network: beta
[2021-May-27 21:38:05.457342]: Work pool running 12 threads 
[2021-May-27 21:38:05.457391]: 0 work peers configured
[2021-May-27 21:38:05.457457]: Outbound Voting Bandwidth limited to 10485760 bytes per second, burst ratio 3
[2021-May-27 21:38:05.461026]: Voting is enabled, more system resources will be used
[2021-May-27 21:38:05.461203]: Node ID: node_3bcppymdqipne9jegjq6mip9qmi5j73xhsuedfp6kh66x7ojh3zjxnw197wr
[2021-May-27 21:38:05.461268]: Dropping unchecked blocks
Network: beta, version: V22.0
Path: ../betadata
Build Info: 4563fb02 "GNU C++ version " "9.3.0" "BOOST 107000" BUILT "May 27 2021"
Database backend: LMDB 0.9.25
[2021-May-27 21:38:05.465222]: Starting legacy bootstrap attempt with ID auto_bootstrap_0
[2021-May-27 21:38:05.465396]: Bootstrap attempt stopped because there are no peers
[2021-May-27 21:38:05.465509]: Exiting legacy bootstrap attempt with ID auto_bootstrap_0
[2021-May-27 21:38:05.466962]: IPC: server started
[2021-May-27 21:38:05.470425]: Pending block search phase complete
Assertion (node.network_params.network.is_dev_network ()) failed
std::unordered_map<nano::block_hash, std::shared_ptr<nano::block> > nano::election::blocks() const
/fast/portmap/nano-node/nano/node/election.cpp:615

Thsi is the callstack:

libc.so.6!__GI_raise(int sig) (/build/glibc-eX1tMB/glibc-2.31/sysdeps/unix/sysv/linux/raise.c:50)
libc.so.6!__GI_abort() (/build/glibc-eX1tMB/glibc-2.31/stdlib/abort.c:79)
assert_internal(const char * check_expr, const char * func, const char * file, unsigned int line, bool is_release_assert, std::string_view error_msg) (/fast/portmap/nano-node/nano/lib/utility.cpp:190)
nano::election::blocks(const nano::election * const this) (/fast/portmap/nano-node/nano/node/election.cpp:615)
nano::active_transactions::cleanup_election(nano::active_transactions * const this, nano::unique_lock & lock_a, const nano::election & election) (/fast/portmap/nano-node/nano/node/active_transactions.cpp:355)
nano::active_transactions::erase_oldest(nano::active_transactions * const this) (/fast/portmap/nano-node/nano/node/active_transactions.cpp:1053)
nano::election_scheduler::run(nano::election_scheduler * const this) (/fast/portmap/nano-node/nano/node/election_scheduler.cpp:119)
nano::election_scheduler::<lambda()>::operator()(void) const(const nano::election_scheduler::<lambda()> * const __closure) (/fast/portmap/nano-node/nano/node/election_scheduler.cpp:7)
std::__invoke_impl<void, nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> >(std::__invoke_other, nano::election_scheduler::<lambda()> &&)(nano::election_scheduler::<lambda()> && __f) (/usr/include/c++/9/bits/invoke.h:60)
std::__invoke<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> >(nano::election_scheduler::<lambda()> &&)(nano::election_scheduler::<lambda()> && __fn) (/usr/include/c++/9/bits/invoke.h:95)
std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>)(std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > > * const this) (/usr/include/c++/9/thread:244)
std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > >::operator()(void)(std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > > * const this) (/usr/include/c++/9/thread:251)
std::thread::_State_impl<std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > > >::_M_run(void)(std::thread::_State_impl<std::thread::_Invoker<std::tuple<nano::election_scheduler::election_scheduler(nano::node&)::<lambda()> > > > * const this) (/usr/include/c++/9/thread:195)
execute_native_thread_routine (Unknown Source:0)
libpthread.so.0!start_thread(void * arg) (/build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477)
libc.so.6!clone() (/build/glibc-eX1tMB/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/clone.S:95)

Node version

aec8d80

Build details

Debug Build

OS and version

Ubuntu 20.04

Steps to reproduce the behavior

  1. Run nano_node on beta network with a synced ledger
  2. It asserts straight away

Expected behavior

To not assert...

Actual behavior

Assertion (node.network_params.network.is_dev_network ()) failed
std::unordered_map<nano::block_hash, std::shared_ptr<nano::block> > nano::election::blocks() const
/fast/portmap/nano-node/nano/node/election.cpp:615

Possible solution

No response

Supporting files

No response

@dsiganos
Copy link
Contributor Author

This is what happens:
in nano::election_scheduler::run():
overfill_predicate () is true
node.active.erase_oldest () is called
which calls cleanup_election()
which calls election.blocks()
which asserts if it is not on dev network

@keerifox
Copy link

wasn't this fixed in #3311 ?

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

No branches or pull requests

2 participants