Install command refuses a running Home when the time locale is not English (strptime on ps lstart)

Đang mở
#517 1 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
73/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ệ
bash, linux, python, rust
Lĩnh vực
backend, cli

Hướng nghiên cứu

Start with the runtime cleanup code in install.sh around line 601, where ps -o lstart= output is parsed by the embedded Python. Check how the two process start-time reads are compared and how Python's locale affects strptime. Add the suggested regression test using a non-English LC_TIME; done when cleanup handles that locale and the installer tests pass.

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

Mô tả

Problem

The install command refuses to update a Home whose Runtime is running when the computer's time format is not English:

[4/5] Install
  ... Stopping verified Runtime processes for this installation so the new version can be installed...
Runtime cleanup stopped: time data 'Mon Nov 2 12:06:28 2026' does not match format '%a %b %d %H:%M:%S %Y'
Error: Close this installation's Runtime and retry; its existing files were preserved

Seen 2 Nov 2026 on a Jetson (Ubuntu 22.04) whose system time locale is es_CO.UTF-8, installing 2.0.0 over a running 2.0.0 Home. Nothing was changed.

Cause

install.sh (2.0.0, line ~601) reads each Runtime's start time with ps -o lstart= under LC_ALL=C (English day and month names), then parses it with time.strptime(..., "%a %b %d %H:%M:%S %Y"). Python's strptime matches %a/%b against the process's own LC_TIME names, so on a Spanish (or any non-English) time locale the English names never match.

Workaround

Stop Home first (Ctrl+C in its terminal), or run the installer with the C locale:

curl -fsSL https://elastos.elacitylabs.com/install.sh | LC_ALL=C bash

Checked: the second form installed and moved that Jetson Home to the stable channel.

Fix

Compare the start time as the raw lstart string (both reads come from ps under LC_ALL=C), or run the embedded Python with LC_ALL=C and set locale.setlocale(locale.LC_TIME, "C") before parsing. Add a test that runs the cleanup with LC_TIME=es_CO.UTF-8 (or any non-English locale available on the runner).

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.