Build can embed the wrong runtime after switching Pulley feature
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
- 55/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ệ
- rust, wasm
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong hyperlight-wasm/build.rs và kiểm tra cách đầu ra runtime lồng nhau và wasm_runtime_resource.rs được tạo sử dụng OUT_DIR và đường dẫn target dùng chung. Tái hiện các chuỗi consumer normal -\u003e pulley -\u003e normal và pulley -\u003e normal -\u003e pulley thông thường, sau đó thử nghiệm các bản build native và Pulley đồng thời. Hoàn tất nghĩa là mỗi thành phần AOT tải runtime được nhúng tương ứng với nó và các bản build đồng thời vẫn được cô lập chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Switching between native and Pulley builds can embed the wrong hyperlight-wasm-runtime guest. A native host build can retain the Pulley runtime and reject a valid x86 AOT component:
GuestError(GuestError, "Module was compiled for architecture 'x86_64'")
Reproduction
Use a consumer feature that enables hyperlight-wasm/pulley.
- Build and run with an x86 AOT component.
- Build and run with the Pulley feature and a Pulley AOT component.
- Build and run with the x86 AOT component again.
The third run can reject the x86 component. This reproduces with hyperlight-wasm 0.15.0 and Wasmtime 36.0.14.
Root cause
hyperlight-wasm/build.rs builds the embedded runtime into a shared nested target directory:
<target>/hyperlight-wasm-runtime/x86_64-hyperlight-none/<profile>/hyperlight-wasm-runtime
Native and Pulley Cargo units have separate OUT_DIR directories. Both generated wasm_runtime_resource.rs files use include_bytes! with this shared mutable path.
The nested Pulley build overwrites the runtime binary. Cargo can rebuild the native hyperlight-wasm unit because the include_bytes! input changed while its build script remains cached. The native unit then embeds the Pulley binary.
The shared output also permits a race between concurrent normal and Pulley builds.
Suggested fix
Copy the completed nested runtime into the outer build script's OUT_DIR. Point include_bytes! at that private copy. This preserves the shared nested compilation cache.
Concurrent builds also need one of these protections:
- Hold a lock across the nested build and copy.
- Use a separate nested target directory for each runtime configuration.
The configuration key must cover pulley, gdb, trace_guest, wasmtime_latest, and the WIT environment values. The outer OUT_DIR provides complete isolation but duplicates compilation work.
Regression coverage
Build a consumer in both sequences. Verify that the final component loads:
normal -> pulley -> normal
pulley -> normal -> pulley
Concurrent native and Pulley builds should produce correctly matched embedded runtimes.
- Ngôn ngữ chính
- Rust
- Star
- 728
- Fork
- 39
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-wasm#550 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Can't update to wasmtime 48Đang mởlifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
hyperlight-dev/hyperlight-wasm#538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function?Đang mởlifecycle/needs review
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lifecycle/needs review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
hyperlight-dev/hyperlight-wasm#378 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Implementing multiple worldsĐang mởlifecycle/confirmed
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
hyperlight-dev/hyperlight-wasm#203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperlight-dev/hyperlight-wasm
Issue tương tự
-
`sysknife history --help` says --since takes ISO-8601, and the parser refuses offsets and bare datesĐang mởbug easy good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 94/100
lacs-project/sysknife#519 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
area:breg bug criticality:p3 triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#1699 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
lbjlaq/Antigravity-Manager#3539 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày