`Func::call` aborts on OOM when Wasm traps (with name section) or throws
Maintainer thường phản hồi trong vòng 1 ngà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
- 30/100
Hướng nghiên cứu
Start with the OOM fuzz target at fuzz/fuzz_targets/oom.rs and the Func::call exception and trap paths described in the issue. Check the linked pull request #15530 for work already underway, then review how exception rooting creates DebugEvents and how wasm_backtrace(true) handles traps. Done means the unnecessary allocation is avoided when no debug handler is registered and the backtrace OOM limitation is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It turns out that Func::call is not quite fully OOM-safe, despite our documentation that says it should be.
There are two ways in which we can still get an OOM:
-
Exception propagation from guest to host, which always does an infallible allocation due to the rooting of the thrown exception.
- The rooting is done in order to create a
DebugEvent, but this is actually unnecessary whenever a debug handler is not registered (i.e., most of the time)!
- The rooting is done in order to create a
-
A trap, when backtraces are enabled (default) and the module has a name section. Maybe this is just a documentation imprecision: we could/should document that Wasm backtrace production is not yet OOM-safe?
This was missed by our OOM-fuzzing because the OOM-fuzzer disables exceptions and does not include a name section in its generated modules.
I believe there are easy fixes for both: (i) conditionally create the DebugEvent for an exception only when a handler is registered (d'oh!), and document that with wasm_backtrace(true), we are not yet OOM-safe.
I'm not sure about the reasoning for disabling exceptions in the fuzzer (here) -- cc @fitzgen on that one?
- Ngôn ngữ chính
- Rust
- Star
- 18.9k
- Fork
- 2k
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 238
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 bytecodealliance/wasmtime
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bytecodealliance/wasmtime#15536 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bytecodealliance/wasmtime#15455 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale readsCó thể đã có người làm @dpfens đã nhận 13 ngày trước. Đang mởwasi
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bytecodealliance/wasmtime#15296 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug wasm-proposal:exceptions wasmtime:debugging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bytecodealliance/wasmtime#14102 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wasm-proposal:gc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
bytecodealliance/wasmtime#13808 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bytecodealliance/wasmtime
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
valkey-io/valkey-glide#7975 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
marklauter/tsong#110 ·
-
docs enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wasm-bindgen/wasm-bindgen#5503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vortex-data/vortex#12633 ·
Maintainer thường phản hồi trong vòng 1 ngày