golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.33k stars 17.58k forks source link

build: wasip1 is broken on wasmer runtime #59907

Open johanbrandhorst opened 1 year ago

johanbrandhorst commented 1 year ago

This is a tracking issue for issues surrounding the use of the new wasip1 GOOS target on the wasmer Wasm runtime. We currently do not have a wasmer runner, but manual testing against the wasmer runtime has already yielded some results, namely, it is known that it exhibits a problem similar to wasmtime when it comes to opening directories (see https://github.com/golang/go/issues/59583#issuecomment-1529157141).

This issue should not be considered done until we have a working wasmer runner and all tests are either passing or we have documented the failures which we cannot reasonably fix.

Currently known failing tests:

Package Test name Error Test log Fixed
archive/tar TestReader open testdata/gnu.tar: Bad file number Full log
gopherbot commented 1 year ago

Change https://go.dev/cl/493755 mentions this issue: all: add wasmer wasip1 runner

gopherbot commented 1 year ago

Change https://go.dev/cl/493775 mentions this issue: misc/wasm: add wasmer to wasip1 script

johanbrandhorst commented 1 year ago

The runner has been added and once the builders have been redeployed I will run a test run to see what errors we hit.

gopherbot commented 1 year ago

Change https://go.dev/cl/495077 mentions this issue: misc/wasm: test commit

johanbrandhorst commented 1 year ago

The first runner test result against the wasmer runtime is in, and it seems that it's refusing to do any file opens, instead erroring with Bad file number on practically all attempts. More investigation will be necessary. I have updated the table at the top.

jakebailey commented 1 year ago

I'm sure you are aware of this, but if you're looking to just check the current status of the runners, the build dashboard does contain links to the most recent builds per commit (wasip1 is all the way on the right), and should be a more convenient way to look up the current failures than CLs like CL 495077 that need the trybots run. That's how I've been watching things, at least.

johanbrandhorst commented 1 year ago

Haha, I didn't actually know that it'd run our broken runners against tip, thanks! I'm still using the CLs to add extra debugging in some cases (like CL 491855) so I'll probably keep them around for myself anyway :).

gopherbot commented 1 year ago

Change https://go.dev/cl/498616 mentions this issue: misc/wasm: set PATH variable in exec

tliron commented 1 year ago

For what it's worth, I have the same issue, but there is no error when running the same code using wasmtime. The issue seems specific to wasmer.

achille-roussel commented 1 year ago

@syrusakbary maybe the wasmer team could help sort out the issue?

arjunmalhotra1 commented 6 months ago

Hey @achille-roussel and @johanbrandhorst, I will be happy to take a look at this if still unresolved and no one is working on this at the moment.