-
Notifications
You must be signed in to change notification settings - Fork 795
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
Election scheduler predicates #3296
Conversation
Thread 44 "Request loop" received signal SIGSEGV, Segmentation fault. Seem to get this every 10 - 11 minutes running a compiled version of this branch. Backtrace:
|
@m-king Is that running the correct branch? That line number 1051 seems empty and 337 isn't calling the correct function. nano-node/nano/node/active_transactions.cpp Line 1051 in 5f5577b nano-node/nano/node/active_transactions.cpp Line 331 in 5f5577b |
Sorry forgot to mention it's running my child branch with the additional stats so the numbers are slightly off, I haven't touched any of this logic, so I think its to do with the new https://github.com/m-king/nano-node/blob/election_overflow_stat_drop/nano/node/active_transactions.cpp#L1051 |
5f5577b
to
0cf134b
Compare
The crash above was caused by the erase methods assuming iterators would be valid across mutex lock/unlock which was no longer guaranteed when the election scheduler became able to delete elections. This was fixed in #3302 |
…redicate functions so identical logic can be checked in the condition_variable wait function and also inside the election_scheduler processing loop. This allows new predicates to be easily added and also eliminates risk of disjoin checks between the loop and the condition variable.
…scheduler::manual since the semantics of ::manual will be changed to not wait for vacancy before inserting.
… vacancy is not considered and elections are started for any blocks passed in. - Moves responsibility for trimming down election count from active_transaction in to election_scheduler. This is done so that more advanced filling/spilling can be done by the election scheduler in the future. - Erases from the active_transactions container by oldest transaction rather than by newest.
… vacancy is not considered and elections are started for any blocks passed in. - Moves responsibility for trimming down election count from active_transaction in to election_scheduler. This is done so that more advanced filling/spilling can be done by the election scheduler in the future. - Erases from the active_transactions container by oldest transaction rather than by newest.
…ses from roots and updates vacancy already.
0cf134b
to
e1d7025
Compare
Election scheduler predicates
This change simplifies logic in the election scheduler. It extracts predicate functions so identical logic can be checked in the condition_variable wait function and also inside the election_scheduler processing loop. This allows new predicates to be easily added and also eliminates risk of disjoin checks between the loop and the condition variable.