GC zeal counter erroneously causes an allocation requiring >1 page of growth to fail
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
Rechercherichtung
Start by reproducing with RUSTFLAGS="--cfg gc_zeal" cargo run wast -Ogc-zeal-alloc-counter=1 foo.wast and comparing against the run without the zeal flag; the wast file in the body is the whole reproducer. Then read the zeal allocation path that synthesizes the out-of-memory error and the GC heap growth routine that reads bytes_needed from it, since the two disagree when the reported need is 0. Done means the multi-page array.new_default of 65500 elements succeeds under zeal while still forcing growth and collection each allocation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
This test:
(module
(type $a (array (mut i8)))
(func (export "alloc") (param i32) (result i32)
(array.len (array.new_default $a (local.get 0)))))
(assert_return (invoke "alloc" (i32.const 65500)) (i32.const 65500))
fails with:
$ RUSTFLAGS="--cfg gc_zeal" cargo run wast -Ogc-zeal-alloc-counter=1 foo.wast
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s
Running `target/debug/wasmtime wast -Ogc-zeal-alloc-counter=1 foo.wast`
Error: failed to run script file 'foo.wast'
Caused by:
0: failed directive on foo.wast:6
1: error while executing at wasm backtrace:
0: 0x29 - wasm-function[0]
at ./foo.wast:4:17
2: GC heap out of memory: no capacity for allocation of 131072 bytes
but passes with:
$ RUSTFLAGS="--cfg gc_zeal" cargo run wast foo.wast
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/wasmtime wast -Ccollector=drc -Wgc foo.wast`
GC heap growth is based on the bytes_needed of the error, but GC zeal injects an error with bytes_needed == 0, so if more than one page is needed the re-attempted allocation after growth still fails, causing the entire allocation to fail.
cc @fitzgen
- Vorherrschende Sprache
- Rust
- Sterne
- 18.9k
- Forks
- 2k
- Ø Merge
- 1 T. 6 Std.
- Gemergte PRs (30 T.)
- 238
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bytecodealliance/wasmtime
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bytecodealliance/wasmtime#15536 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bytecodealliance/wasmtime#15455 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale readsEvtl. vergeben @dpfens hat das vor 13 Tagen übernommen. Offenwasi
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bytecodealliance/wasmtime#15296 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug wasm-proposal:exceptions wasmtime:debugging
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
bytecodealliance/wasmtime#14102 ·
Maintainer antworten meist innerhalb von 1 Tag
-
wasm-proposal:gc
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
bytecodealliance/wasmtime#13808 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in bytecodealliance/wasmtime
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
area: plugins bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
clipy-recorder/clipy#1039 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
valkey-io/valkey-glide#7975 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
gofractally/psibase#2379 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Qwen stream parser: a chunk with "error": null is treated as a stream errorEvtl. vergeben @Beehtrix hat das heute übernommen. Offenarea:models bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
brekkylab/ailoy#681 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen