Open dsiganos opened 2 years ago
The poll() during the test is pretty suspect. It is effectively a timeout failure set to 500000 milliseconds.
while (std::any_of (begin, nodes.end (), [] (std::shared_ptr<nano::node> const & node_a) { return node_a->bootstrap_initiator.in_progress (); }))
{
poll ();
++iterations1;
debug_assert (iterations1 < 10000);
}
Not sure why this test spins up 64 nodes when anything > NUM_CPUs should suffice.
TEST (node, fork_storm)
{
nano::node_flags flags;
flags.disable_max_peers_per_ip = true;
nano::system system (64, nano::transport::transport_type::tcp, flags);
...
Once you are past that, the rest of the test intermittently loops forever when this evaluates to true:
again = empty != 0 || single != 0;
in cases I have seen, empty is the number of nodes allocated at the beginning of the test and single == 0.
Empty: 16 single: 0
Empty: 16 single: 0
Empty: 16 single: 0
Empty: 16 single: 0
Where I intentionally reduced the node allocation count locally to improve iteration times.
Or:
Empty: 15 single: 1
Empty: 15 single: 1
Empty: 15 single: 1
Empty: 15 single: 1
Forever....
When that doesn't happen, sometimes it simply dumps core during the test.
The lack of deterministic behavior in this test really smells funny, meaning there may be an underlying problem it has uncovered that needs attention.
@dsiganos - Here is another issue that looks like it can be closed due to a merged PR
These tests are still failing.
Node version: v23.0
Note: incrase the file limit before running the test:
ulimit -n 10000