Skip to content

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

Open

Description

@andersalm

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions