🤖 ddm: forwarding updates race with DB updates

Aperta
#995 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
100
Fork
8
Merge medio
2g 1h
PR unite (30g)
18

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oxidecomputer/maghemite

Tutte le issue di oxidecomputer/maghemite

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.