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

election_scheduler::flush() has a race condition #3909

Open
dsiganos opened this issue Aug 25, 2022 · 1 comment
Open

election_scheduler::flush() has a race condition #3909

dsiganos opened this issue Aug 25, 2022 · 1 comment
Labels
Milestone

Comments

@dsiganos
Copy link
Contributor

It was proven during a debugging session a few months ago that the election scheduler flush was broken and could return prematurely.
It was decided to stop using it and remove the flush functionality.

@dsiganos dsiganos added the bug label Aug 25, 2022
@dsiganos dsiganos added this to the V25.0 milestone Oct 1, 2022
@dsiganos
Copy link
Contributor Author

dsiganos commented Oct 1, 2022

Some more information on this:

election_scheduler::flush is expected to do more than it should.

Test code expects to do the following:

  • queue a block in the election scheduler
  • call scheduler flush
  • expect to find a live election in the AEC for that block

That approach has problems:

  • it expects election scheduler to know the internal implementation of AEC and give guarantees about when elections inside the AEC become are started
  • it can return even if it did not flush the election scheduler (because it returns when AEC is full)

The election flush is used by wallet, rpm block_confirm command and test code.
The test code can be made to use ASSERT_TIMELY and wait for the election to be started rather than facing it to start.
The roc and wallet dependencies need to be reviewed and make a plan as to how to handle them.

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

1 participant