WASM components: add a wall-clock cutoff (Wasmtime epoch interruption) next to fuel and memory limits

Đang mở
#479 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
39/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start with elastos/crates/elastos-compute/src/providers/component.rs and trace how component calls configure fuel and memory limits. Read the Wasmtime 36.0.19 epoch interruption APIs, then identify the Runtime ticker and per-capsule configuration entry points. Done means deadline errors stop overdue calls while keeping the Runtime responsive, configurable limits and coverage for all three call scenarios, plus Jetson overhead measurements.

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

Mô tả

Today: component capsules run with a fuel limit and a memory limit (elastos/crates/elastos-compute/src/providers/component.rs: consume_fuel, set_fuel(COMPONENT_FUEL), StoreLimitsBuilder::memory_size). They have no time-based limit.

Proposal (Sash, 22 Oct): enable Wasmtime epoch interruption (Config::epoch_interruption), with a Runtime ticker and a per-call deadline, so a call also ends after a set wall-clock time. That covers time spent outside fuel accounting.

Done means:

  • a component call that exceeds its deadline is stopped with a clear error, and the Runtime stays responsive;
  • the deadline is configurable per capsule class;
  • tests cover a busy loop, a long host-call wait and a normal call under the limit;
  • the overhead is measured on the Jetson.

Not in 0.8.0. The Wasmtime 36.0.19 security update is already on the 0.8.0 train.

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.