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

Đang mở
#505 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
linux, rust
Lĩnh vực
backend, operating-systems

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
6
Fork
2
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
42

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của elastos/elastos-runtime

Tất cả issue của elastos/elastos-runtime

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.