-
Notifications
You must be signed in to change notification settings - Fork 73
wasmtime: update to v0.32.0 #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Faseela K <[email protected]>
cc @phlax |
@PiotrSikora : Any idea how to fix the current build error? ERROR: /home/runner/.cache/bazel/_bazel_runner/ae21fb6b2e26a9267f16b46bb90ea321/external/proxy_wasm_cpp_host__cpufeatures__0_2_1/BUILD.bazel:33:13: Label '@proxy_wasm_cpp_host__libc__0_2_112//:libc' is duplicated in the 'deps' attribute of rule 'cpufeatures' how do i fix this duplicate? |
Signed-off-by: Faseela K <[email protected]>
@kfaseela oops, it looks that you need to manually collapse them in |
Signed-off-by: Faseela K <[email protected]>
Signed-off-by: Faseela K <[email protected]>
This is a bit more complex than a simple update, but we're getting close. You need to:
|
Signed-off-by: Faseela K <[email protected]>
Signed-off-by: Faseela K <[email protected]>
Signed-off-by: Faseela K <[email protected]>
Done. And thanks a lot for all the detailed feedback! |
@kfaseela thanks for all the work, this looks good now! Would you mind updating |
@PiotrSikora It still failed : envoyproxy/envoy#19285 ERROR: /build/tmp/_bazel_envoybuild/400406edc57d332f0b9b805d2b8e33a1/external/envoy/test/extensions/common/wasm/BUILD:18:14: Linking external/envoy/test/extensions/common/wasm/wasm_vm_test failed: (Exit 1): clang failed: error executing command
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build rules are fine, and I was able to sucessfully build envoyproxy/envoy#19285 locally. The issue is with the build image used in Envoy's CI (Ubuntu 18.04 with glibc 2.27), because rustix
requires glibc 2.28 or newer for renameat2
when using libc
backend. Interestingly, while the version of rustix
(previously rsix
) in wasmtime v0.32.0 defaults to linux-raw
, it previously defaulted to libc
, so this shouldn't be a new dependency, and it would be good to investigate why this became an issue.
Separately, the successfully built binary and tests crash in Envoy when initializing WasmVM, so there is a lot more work that needs to be done before this can be merged. I looked a bit into it, but I don't have any idea why it's broken.
If you want to investigate this, then I'd start with:
- Figuring out the difference between tests here and in Envoy (i.e. why tests in this repository pass, but those in Envoy crash). It could be because of multiple WasmVM instances and canarying in Envoy that's missing in tests here, or simply because we don't have a good test coverage in this repository.
- Figuring out why glibc became an issue (bisecting / looking at changes in
rustix
between v0.23.2 and v0.26.2, and inwasmtime
between v0.31.0 and v0.32.0).
OK, I found the issue. It looks that the ownership model for vectors was changed in wasmtime v0.32.0 (bytecodealliance/wasmtime@ce67e7f), so you need to remove those 3 lines from proxy-wasm-cpp-host/src/wasmtime/wasmtime.cc Lines 433 to 435 in f383473
Once those lines are removed, all tests in Envoy pass, but we still need to figure out the glibc issue before this can be used in Envoy on Ubuntu 18.04. |
@kfaseela you've missed this step (you'll also need to restore the exclusion for Other than that, everything looks fine now, so you could update Envoy PR once you incorporate those changes. Thanks! |
Signed-off-by: Faseela K <[email protected]>
Signed-off-by: Faseela K <[email protected]>
Signed-off-by: Faseela K <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Could you update envoyproxy/envoy#19285 to verify this end-to-end on Envoy's CI before merging?
Missed in proxy-wasm#205. Signed-off-by: Piotr Sikora <[email protected]>
OK, I finally figured this out. This PR didn't update wasmtime to v0.32.0 in Verified and fixed in #209. |
@PiotrSikora : Thank you so much for all the help with this PR! |
Missed in #205. Signed-off-by: Piotr Sikora <[email protected]>
attempting to update wasmtime in Envoy main
Signed-off-by: Faseela K [email protected]