runtime: tight loops not preempted on wasm #60857
Labels
arch-wasm
WebAssembly issues
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No, not exactly. The above version is "head" of the repo, which is not released yet.
If running on 1.20 on arm64/darwin, it does not reproduce. Running on the same release but with arm64/darwin it does not reproduce.
What operating system and processor architecture are you using (
go env
)?go env
OutputThis only occurs with `wasm/wasip1` as the GOARCH and GOOS.
What did you do?
https://go.dev/play/p/-em2D-ypmWG?v=goprev
The above link works fine on prev release, current release, and dev release in go playground. The problem only appears when you are on
wasm/wasip1
with 1.21 (head).The program will not produce any output with either
wasmtime
orwazero
as the host wasm environment. If you uncomment the calls to runtime.Gosched() you will see that one goroutine is created, so you see one line of output, but not two as you do with go playground.What did you expect to see?
What is shown on go playground:
What did you see instead?
Nothing.
@neelance
The text was updated successfully, but these errors were encountered: