RelayRoom keeps a revoked Burrow forwarding when its sweep's row read fails
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Start with RelayRoom.#sweep and RelayRoom.alarm in hosted/server/relay-room.ts, then read the timing constants in hosted/server/relay-room-contract.ts and the stalled row-read test in hosted/server/tests/relay-room.test.ts. Resolve the fail-open versus retry policy, update the code and test, and align the Relay boundary FAIL IF in docs/specs/security-hosted.md with the chosen behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Code: RelayRoom.#sweep in hosted/server/relay-room.ts; the alarm in RelayRoom.alarm re-arms RELAY_ROOM_SWEEP_MS (one hour, hosted/server/relay-room-contract.ts) out whatever the sweep did.
Failure path: a Burrow is removed or de-entitled by any path that does not reach closeBurrow (an entitlement change, or a removal whose closeBurrow RPC failed, which the DELETE route logs and answers 204 anyway). The next alarm calls #sweep. #rows throws (database error, or RELAY_ROW_READ_TIMEOUT_MS passes), the catch logs "could not sweep" and returns, and alarm() arms the next sweep an hour later. The socket keeps forwarding authenticated frames past the sweep it should have died at. If the database stays unreachable, it keeps forwarding through every later sweep too.
This breaks the docs/specs/security-hosted.md -> "Relay boundary" FAIL IF: "a removed or de-entitled Burrow's [socket] outlives the next sweep, at most RELAY_ROOM_SWEEP_MS while any Burrow socket is held". hosted/server/tests/relay-room.test.ts ("a stalled row read … leaves the sweep for later, the object's sockets open") pins the current behavior. Keeping sockets open on a failed read was a deliberate choice: #rows says a stalled read must not reset "the object and every socket it holds".
Suggested fix: decide the policy first, then change the code, test, and FAIL IF together. Options:
- Fail closed. On a failed sweep read, retire every held Burrow with a retryable close code. Each one reconnects through the upgrade, which rechecks its row under
blockConcurrencyWhileand is refused while the database is down. This meets the FAIL IF exactly, at the cost of dropping every session during a database blip. - Retry soon. On failure, arm the alarm at
now + RELAY_ROW_READ_TIMEOUT_MS(or about a minute), not an hour, and fail closed only after N consecutive failures or onceRELAY_ROOM_SWEEP_MShas passed since the last good sweep. Then reword the FAIL IF to "withinRELAY_ROOM_SWEEP_MSof the last successful sweep".
Option 2 keeps the bound at one sweep interval, or a small multiple of it, without resetting sockets on a single slow query.
Found while trimming #904, which had parked this as a spec "Known gap".
🤖 Generated with Claude Code
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 1
- Merge medio
- 12h 46m
- PR unite (30g)
- 322
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di diffplug/dormouse
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
diffplug/dormouse#912 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
security-audit-failure
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
diffplug/dormouse#908 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
review-runs-tracking
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
diffplug/dormouse#881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
diffplug/dormouse#845 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
diffplug/dormouse#839 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di diffplug/dormouse
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
external-issue to-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
diegosouzapw/OmniRoute#15401 ·
I maintainer di solito rispondono entro 2 giorni
-
Sign the pledgeAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
input-output-hk/devx-updates#163 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
code-yeongyu/oh-my-openagent#9454 ·
I maintainer di solito rispondono entro 1 giorno