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

Fix use-after-free during consensus shutdown #5759

Merged
merged 3 commits into from
Aug 1, 2022

Commits on Aug 1, 2022

  1. r/consensus: coroutinized raft::stop() method

    Signed-off-by: Michal Maslanka <michal@redpanda.com>
    mmaslankaprv committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    acde644 View commit details
    Browse the repository at this point in the history
  2. r/consensus: break _op_lock when stopping consensus

    When raft stops the last step in stop sequence is closing gate. After
    gate is closed all the background futures are guaranteed to be finished.
    However it may happen that the fiber is waiting for an `_op_lock` while
    gate is being closed. We need to make sure that when gate is closed no
    other fiber can acquire the `_op_lock`.
    
    Marking `_op_lock` mutex as broken prevents all waiters for acquiring a
    mutex and at the same time accessing `consensus` state.
    
    Fixes: redpanda-data#5759
    
    Signed-off-by: Michal Maslanka <michal@redpanda.com>
    mmaslankaprv committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    ab31867 View commit details
    Browse the repository at this point in the history
  3. r/consensus: applied formatting

    Signed-off-by: Michal Maslanka <michal@redpanda.com>
    mmaslankaprv committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    a616d35 View commit details
    Browse the repository at this point in the history