Kubo migration cannot stop an alpha.25 daemon that outlived Runtime (--enable-gc ignores API shutdown)

Aperta
#505 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
42/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux, rust

Direzione di ricerca

Start in retire_online_coord and trace how it verifies daemon ownership, sends /shutdown, and handles the five-second wait; the issue also points to update_controller/child.rs and scripts/mac-source-home-restart.sh. Run the real-Kubo test with its daemon started using --enable-gc to reproduce the failure. Done means the owned daemon is stopped after accepting shutdown, the test covers that case, and the source-Home restart stops the gateway process group.

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

Descrizione

Found 29 Oct while testing the 0.8.0-alpha.26 candidate (8a74b669c).

What happens: Kubo started with --enable-gc (every alpha.25 and alpha.26 daemon) answers /api/v0/shutdown with 200 but does not exit until a second interrupt. The offline migration (retire_online_coord, capsules/ipfs-provider) relies on that API shutdown, so if an alpha.25 online daemon is still running when the new Runtime starts, the migration refuses every start and local IPFS stays unusable until a reboot or a manual kill; the old daemon keeps running online.

Why it does not affect normal installs: the installed stop and elastos update kill Runtime's whole process group (update_controller/child.rs), which includes Kubo, so the old daemon is gone before the new Runtime starts. CI update journeys pass. It shows only when a daemon survives outside that, e.g. after a crash or on source Homes (scripts/mac-source-home-restart.sh signals only the gateway pid).

Fix (0.8.1): in retire_online_coord, after a daemon proven to be ours (our PeerID from /id, holds our repo lock) accepted /shutdown and is still alive after 5 s, send it one SIGTERM (Kubo's own second-interrupt force stop); keep the refusal if it still runs. Make the real-Kubo test start its online daemon with --enable-gc so it fails before the fix. Also have the source-Home restart script stop the gateway's process group.

Lingua principale
Rust
Stelle
6
Fork
2
Merge medio
1g 3h
PR unite (30g)
42

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 elastos/elastos-runtime

Tutte le issue di elastos/elastos-runtime

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.