Self-Stabilizing Paxos

Peva Blanchard, Shlomi Dolev, Joffroy Beauquier, Sylvie DelaëtarXiv 2013

Abstract

Standard Paxos, the foundational algorithm for distributed consensus, is vulnerable to transient faults such as memory corruption or arbitrary message injection. This paper introduces the first self-stabilizing version of Paxos designed for asynchronous message-passing systems. By utilizing a novel tag system and a finite labeling scheme, the algorithm can recover from any corrupted state and return to correct operation without human intervention, even when operating within the constraints of realistic bounded counters.

Introduction

Distributed consensus is the backbone of modern cloud infrastructure, powering replicated state machines (RSMs) at companies like Google and Amazon. Paxos is the industry standard for achieving this consensus. However, Paxos typically assumes a "clean" initial state. In production environments, transient faults—such as cosmic-ray-induced bit flips or software bugs—can corrupt internal state.

If a critical variable, like a proposal number, is corrupted to its maximum possible value (e.g., $2^{64}-1$), standard Paxos can become permanently blocked, as no proposer can ever issue a higher number to make progress. This paper addresses this fragility by making Paxos self-stabilizing: regardless of the initial (possibly corrupted) state, the system eventually converges to a state where it satisfies both safety and liveness requirements.

Methodology: The Tag System

The core innovation of this work is a Tag System that replaces the simple unbounded integers used in traditional Paxos. This system is designed to handle the realities of finite memory while providing the illusion of infinite progress.

1. Tag Vectors and Ownership

To prevent a single corrupted processor from permanently poisoning the consensus process, each processor maintains a vector of tags. Each entry in the vector is "owned" by a specific processor. This ensures that proposers do not interfere with each other's recovery attempts and that corrupted values can be isolated.

2. Finite Labeling Scheme

To solve the "maximum value" problem, the authors employ a sophisticated labeling scheme. This scheme allows a proposer to generate a new label that is considered "greater" than any existing label in the system, even within a finite domain.

Figure 1: Comparison logic for labels a and a' in the self-stabilizing tag system.

As shown in Figure 1, the comparison logic ($a \prec a'$) is used to order these labels. Crucially, this relation is not transitive; it is a non-total order that allows the system to "out-bid" any arbitrary set of corrupted labels. This "trick" enables the system to reset logical counters to low values when it encounters corrupted high values, effectively restarting the Paxos logic from a clean slate.

3. Preempting and Failure Detection

Proposers execute a routine to "recruit" a quorum. If they encounter tags that are corrupted or excessively high, they use the labeling scheme to "cancel" those tags. The algorithm relies on a weak, self-stabilizing failure detector ($\Theta$) to ensure that at least one active proposer can drive the recovery process.

Key Results and Insights

The authors provide a formal mathematical proof that from any initial configuration, the system will reach a "0-safe epoch." During this epoch, the system behaves identically to the original Paxos algorithm for a duration that is practically infinite (e.g., hundreds of years for a 64-bit counter).

Furthermore, the paper extends this core logic to Generalized Paxos. This extension allows for more efficient RSMs by permitting non-conflicting commands to execute in parallel, demonstrating that self-stabilization does not necessarily come at the cost of modern performance optimizations.

Conclusion

While the tag system and labeling logic introduce significant implementation complexity compared to standard Paxos, they provide a necessary layer of defense for mission-critical systems. The transition from "theoretically infinite" to "practically self-stabilizing" allows distributed systems to survive the inevitable transient faults of real-world hardware, ensuring that consensus remains bulletproof even in the face of arbitrary state corruption.

Summary updated

BibTeX
@misc{blanchard2013self,
  author = {Peva Blanchard and Shlomi Dolev and Joffroy Beauquier and Sylvie Delaët},
  title = {{Self-Stabilizing Paxos}},
  year = {2013},
  eprint = {1305.4263},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1305.4263},
}
Figure