DDM drops updates when in solicit state.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 43/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- networking
Línea de trabajo
Start with ddm/src/sm/state.rs, especially the Solicit peer-event handler and the Exchange entry path; then trace how ddm/src/exchange/runtime.rs delivers updates. The issue identifies dropped Push events and lists candidate fixes, but leaves the design choice open. Done means a prefix learned during this timing window reaches the peer and is covered by a regression test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I ran into this while testing https://github.com/oxidecomputer/omicron/pull/11684 on voxel, which changes the timing around RSS a bit and induces the race.
🤖 did a thorough analysis:
RSS handoff to Nexus wedged by a missing DDM route (g1 → g2)
Rack: voxel 4-sled (g0,g3 scrimlets; g1,g2 gimlets), launched 2026-11-04 16:00 UTC
Rack UUID: 85e4096f-1593-402b-b22f-9ecc3ea2c1ea
Symptom: RSS never completes handoff; retries every ~60s since 16:17:42, still failing at 16:50.
Handoff is a symptom. The defect is in DDM prefix propagation: g2 never learned g1's underlay
prefix, which partially partitions CockroachDB and starves Nexus of DB connections.
Causal chain
1. g2 is missing the route to g1's underlay prefix
netstat -rn -f inet6:
| sled | has 102::/64 (g1) |
has 103::/64 (g2) |
|---|---|---|
| g1 | local | yes, via both switches |
| g2 | absent | local |
g2 is also missing fd6c:ef99:c06e:2::/64 (g1's bootstrap prefix). Every other
c06e:10x::/64 is present on g2.
Result is a one-way partition that fails in both directions, because g2 cannot route replies:
from n2 (g1, 102::3): 101::3 OK 103::3 FAIL 104::3 OK 104::4 OK
from n4 (g2, 103::3): 101::3 OK 102::3 FAIL 104::3 OK 104::4 OK
2. This is a propagation gap, not a session failure
- g1 advertises correctly —
ddmadm get-originatedon g1:
fd6c:ef99:c06e:102::/64,fd6c:ef99:c06e:2::/64,fdb0:a840:2500:3::/64 - Both switch zones have learned it —
ddmadm get-prefixesinoxz_switchon g0 and g3 each
show all four of101::/64 (g0),102::/64 (g1),103::/64 (g2),104::/64 (g3) - g2's
ddmadm get-prefixesshows prefixes originated by g0 and g3 only, over both
sw2FAKE000andsw2FAKE003. Nothing from g1. - All DDM sessions are healthy and in
Exchange.
So the switches know the route and simply never relayed it to g2.
Peer-session ages on g0's oxz_switch (at time of capture):
g0 Server Exchange 42m 53s
g3 Server Exchange 42m 54s
g1 Server Exchange 37m 52s
g2 Server Exchange 37m 45s
g0's and g3's prefixes (learned ~42m ago) did reach g2, so initial full-table sync works.
g1's session came up only ~7s before g2's. This is a race — see
root cause below.
3. CockroachDB takes a partial partition
n4 (g2) cannot reach n2 (g1). From n4's cockroach.log, continuously:
side-transport failed to connect to n2: unable to dial n2: ‹breaker open›
could not successfully add and upreplicate LEARNER replica(s) on [n2,s2],
rolling back: unable to dial n2: ‹breaker open›
cockroach node status still reports all 5 nodes is_live and is_available, because
n1/n3/n5 can reach everyone. Partial partitions are the pathological case — liveness looks fine
while work silently stops.
Node → sled map:
| node | address | sled |
|---|---|---|
| n1 | fd6c:ef99:c06e:101::3 |
g0 |
| n2 | fd6c:ef99:c06e:102::3 |
g1 |
| n3 | fd6c:ef99:c06e:104::3 |
g3 |
| n4 | fd6c:ef99:c06e:103::3 |
g2 |
| n5 | fd6c:ef99:c06e:104::4 |
g3 |
4. Ranges wedge behind an unpushable transaction
28 open transactions, all 28 with a blocked active query, oldest ~31 min. Only 6 contention
events, so this is not ordinary contention.
crdb_internal.cluster_locks where contended:
| table | range | granted | count |
|---|---|---|---|
ip_pool |
153 | false | 12 |
inv_collection |
93 | false | 5 |
inv_collection |
93 | true | 1 |
bp_omicron_zone_nic |
209 | true | 1 |
bp_omicron_zone_nic |
209 | false | 1 |
ip_pool |
153 | true | 1 |
Holders:
| holds lock on | held for | holder's current query |
|---|---|---|
inv_collection |
31m46s | INSERT INTO inv_host_phase_1_active_slot(...) (blocked) |
ip_pool |
30m42s | INSERT INTO bp_omicron_zone_nic(...) (blocked) |
bp_omicron_zone_nic |
31m58s | none — txn 461f9f5d-f06b-4a4a-8f7c-deb5a0bfc87f has no row in cluster_transactions |
The root blocker has no coordinator record and is not being pushed/aborted, so the chain never
unwinds. Replica sets are all intact (r153 {1,3,4}, r93 {1,2,3,4,5}, r209 {1,2,3,4,5}) and
lease_holder for r153 resolves instantly to n4 — this is not a quorum or lease problem.
Reads are affected per-table, which is what pointed at locks rather than a dead node:
rack 0s -> 1
sled 0s -> 4
service_network_interface 1s -> 0
ip_pool timeout
inv_collection timeout
ip_pool hangs identically through all five gateway nodes. SELECT 1 is instant.
5. Nexus's connection pool drains, handoff 503s
Every Nexus request now fails:
error_message_external: "Service Unavailable"
error_message_internal: "Failed to access DB connection: Backends exist, and appear online,
but all claims are used"
response_code: 503 latency_us: 30001867
52 CRDB sessions from Nexus, all claims held by blocked queries.
RSS, sled-agent/rack-setup/src/service.rs:924:
"Failed to handoff to nexus"
PUT http://[fd6c:ef99:c06e:101::5]:12232/racks/85e4096f-.../initialization-complete
→ 503 ServiceNotAvailable (and, intermittently, "operation timed out")
The request does reach Nexus and authorizes successfully — it then blocks on the DB and times out.
Root cause: a 7-second window in the DDM exchange FSM
Source read at maghemite 6fee306 — the commit omicron pins for mg-ddm / mg-ddm-gz
(package-manifest.toml, tools/maghemite_ddm_openapi_version). Still unfixed on
origin/main (2b157ac); the two commits since do not touch ddm/src/{sm,exchange,discovery}.
There are exactly two ways a sled learns a prefix, and both are one-shot
ddmd runs one FSM per link. On the switch (mode = transit, per svcprop -p config mg-ddm)
the four sled-facing FSMs are cross-connected by a static channel mesh built once at
startup — ddmd/src/main.rs:312, "Add an event channel sender for each state machine to
every other state machine."
-
Pull. On entering
Exchange, an FSM spawnsinitial_pull, which GETs/v3/pullfrom
the peer. The transit router'spull_handler(ddm/src/exchange/runtime.rs:456) answers
with its entiredb.imported(). This is the full-table sync — but it fires only on
Exchangeentry. The only other trigger isAdminEvent::Sync
(ddm/src/sm/state.rs:699), reachable just from the admin API. Nothing re-pulls
periodically. -
Push. When a transit FSM imports something,
handle_update
(runtime.rs:528) sendsPeerEvent::Redistributeto its own FSM, whose handler
(state.rs:833) breaks loops, appends the router ID, and fans aPeerEvent::Pushout
across the channel mesh. Each sibling FSM then callsannounce_underlayto its own peer.
There is a third path, AdminEvent::NewExternalPeer (state.rs:716), where an FSM pushes its
whole db.imported() to a newly-arrived peer. It is gated on self.ctx.iface.external, and
ddmadm get-external-peers on both switches returns empty. Rear ports are not external, so
this never fires here.
The window: Solicit silently discards peer events
state.rs:770:
Event::Peer(e) => {
wrn!(self.log, self.ctx.config.if_name,
"peer event in solicit state: {:?}", e);
}
A Push that arrives while the destination FSM is still in Solicit is logged and dropped.
It is never retried, and since the peer has already done its one pull, nothing else will ever
carry that prefix.
Measured timeline
ddmadm get-peers reports time-in-current-state, so entry times are exact. Captured
17:53:24 UTC (switches) and 17:52:53 UTC (sleds):
| FSM | duration | entered Exchange |
|---|---|---|
sw2FAKE000 → g0 |
1h41m52s | 16:11:32 |
sw2FAKE000 → g3 |
1h41m53s | 16:11:31 |
| g2 → both switches | 1h36m51s | 16:16:02 |
| g1 → both switches | 1h36m19s | 16:16:34 |
sw2FAKE000 → g1 |
1h36m51s | 16:16:33 |
sw2FAKE000 → g2 |
1h36m44s | 16:16:40 |
sw2FAKE003 → g1 |
1h36m52s | 16:16:32 |
sw2FAKE003 → g2 |
1h36m42s | 16:16:42 |
Note the direction skew: g2's FSM reached Exchange 38 s before the switch's FSM for g2 did.
Discovery is solicit/advertise per direction, so the two halves of a session come up
independently — that is what opens the window.
Replaying it:
- 16:16:02 — g2 pulls the switch's table. The switch holds g0's and g3's prefixes only.
g2 installs101::/64and104::/64. This is g2's one and only pull. - 16:16:33 — the switch's g1 FSM enters
Exchange, pulls from g1, imports102::/64,
and fans out aPush. The switch's g2 FSM is still inSolicitfor another 7 s.
The announcement to g2 is dropped on the floor. - 16:16:40 — the switch's g2 FSM enters
Exchange, pulls from g2, imports103::/64,
fans out aPush. The g1 FSM has been inExchangesince 16:16:33, so g1 receives it
and installs103::/64.
That asymmetry — g1 has g2's prefix, g2 lacks g1's — is the exact state observed, and it
reproduced independently on both switches (7 s window on sw2FAKE000, 10 s on sw2FAKE003).
The switch-zone log can't corroborate the dropped-Push warning directly:
/var/svc/log/oxide-mg-ddm:default.log begins at 16:23:09, after the event, and config/log
is info, which filters the dbg! "redistributing update to N peers" line.
Why this isn't just a startup curiosity
The same window reopens on any mid-life session reset: an FSM that re-enters Exchange pulls
from its peer but never re-sends its own table, and the peer has no reason to re-pull. A failed
announce_underlay expires the peer back to Solicit (state.rs:762, state.rs:790), which
is itself a way to land in the lossy state.
Candidate fixes, roughly in order of invasiveness: queue or replay peer events received in
Solicit instead of dropping them; have a transit FSM push db.imported() on every Exchange
entry, not only for external interfaces; or add a periodic reconcile pull.
Remediation
ddmadm sync makes every local FSM re-pull from its peer (ddm/src/admin.rs:421 →
AdminEvent::Sync). Run it on g2 and it will re-pull both switches, both of which already
hold 102::/64, installing the missing route — no daemon restart, no session flap:
ddmadm sync # in g2's global zone
That should restore n2↔n4, let the wedged transactions resolve, free Nexus's pool, and allow
RSS's next retry to succeed.
Not yet attempted — rack left untouched.
- Lenguaje dominante
- Rust
- Estrellas
- 100
- Forks
- 8
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 18
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de oxidecomputer/maghemite
-
ICMPv6 Router Solicitations are generated with invalid checksumsPosiblemente ocupada @taspelund la tomó hace 154 días. AbiertoBug mgd ndp rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oxidecomputer/maghemite#802 ·
Los mantenedores suelen responder en 1 día
-
ddm
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
oxidecomputer/maghemite#1039 ·
Los mantenedores suelen responder en 1 día
-
ddm want
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
oxidecomputer/maghemite#1033 ·
Los mantenedores suelen responder en 1 día
-
Bug ddm rust
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
oxidecomputer/maghemite#997 ·
Los mantenedores suelen responder en 1 día
-
🤖 ddm: a withdraw removes a route that a second source still givesPosiblemente ocupada @taspelund la tomó hace 19 días. AbiertoBug ddm rust
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
oxidecomputer/maghemite#996 ·
Los mantenedores suelen responder en 1 día
Todos los issues de oxidecomputer/maghemite
Issues similares
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedAbiertounconfirmed possible issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jerney-nexus/epikrise#364 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Yeachan-Heo/gajae-code#8058 ·
Los mantenedores suelen responder en 1 día
-
bug daemon
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día