🤖 ddm: forwarding updates race with DB updates

オープン
#995 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
networking

調査の方向性

Start in ddm/src/exchange/runtime.rs at the underlay flow around lines 664–692 and the tunnel flow around lines 554–621. Trace how each path updates the DB and forwarding, then compare the proposed single-lock approach with a DB-following reconciler. Done means forwarding stays consistent with the DB under concurrent updates; the issue does not specify tests or a preferred design.

索引モデルが issue の本文から書いたものです。

説明

Bug ddm rust
ddm: forwarding updates race with DB updates

ddm reads the DB, writes the DB, and changes forwarding in different steps. Each step uses a different lock. Another writer can change the DB between the steps. Nothing makes the DB and forwarding agree after that.

Underlay (runtime.rs L664-L692). The pull thread and the Push handlers of one session operate at the same time.

sequenceDiagram
    autonumber
    participant H as Push handler
    participant PT as Pull thread
    participant DB as DB
    participant F as Forwarding
    H->>DB: delete path p1 of X
    H->>DB: other paths for X? none
    PT->>DB: add path p2 of X
    PT->>F: install X
    H->>F: remove X
    Note over DB,F: DB has X (path p2). Forwarding has no X.

Tunnel (runtime.rs L554-L621). Each session compares effective_route_set before and after its change. Then it writes to OPTE outside a lock. Other sessions change the same table at the same time. Thus their changes mix into the comparison, and OPTE calls from different sessions can arrive in the wrong order.

Correction: Calculate and apply forwarding changes under one lock. Or, make forwarding follow the DB with a reconciler. A reconciler also repairs #345.

主要言語
Rust
スター
100
フォーク
8
平均マージ
2日 1時間
マージ済み PR(30日)
18

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/maghemite のほかの issue

oxidecomputer/maghemite の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。