-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
WAVM WASM runtime failing just after startup #20134
Comments
Note: this conversation on Google Groups is related to this question: https://groups.google.com/g/envoy-dev/c/pRWpAfix8K8 |
ping @envoyproxy/wasm-dev |
Are you using precompiled modules? There might be a version mismatch between the compiler and WAVM in Envoy, since the precompiled section generated by WAVM isn't versioned (...and if you don't, then I wouldn't recommend using WAVM in production, since the compilation at load-time takes prohibitively high amount of time). It's also possible that you're running out of heap or stack, but I'd expect a different message then. Do you have a minimal reproducer (config + Proxy-Wasm plugin sources) that you could share, by any chance? As for the debugging, you can start Envoy with logging at the |
Thanks for the update. I'll work at getting a minimal reproducer and check if the WASM I'm supplying is pre-compiled. The trace level logging is not showing anything new. Here is the first mention of wasm to the crash. The only trace log has a blank message.
How do we interpret the stack trace? What are the function #s? and the +278 elements after the function? Are they referring to the WASM code or the WAVM runtime? (BTW, I see a 7 second delay between the blank trace line and the next log... I assume this is WAVM compiling the WASM code. Correct? Is this needed for the startup of each WAVM VM or do they share compiled code?) |
It looks like the Wasm module that you're using has debug symbols stripped, which is why you see function numbers instead of the function names.
OK, so you're not using precompiled modules. Wasm module is compiled once for each WasmVM instance, and It's shared across worker threads via cloning of compiled cone, but I don't know if there is any built-in cache in WAVM to share compiled code across various WasmVM instances (again, using WAVM without precompiled modules isn't practical). |
Here is a minimal repro: https://github.com/frankt-vmware/20134-repro (@162168d) This shows approximately the same crash when loading a service extension:
We can see it crashing in the proxy-runtime library: So we are executing WASM code in the extension. Interestingly, I also updated to more recent dependent libraries for
This looks like we don't even get to running the extension code at all. I As I mentioned on the Google Groups thread. If v8 is already JIT compiled and |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
I've built envoy with the WAVM WASM runtime enabled to allow me to compare performance of code running in the v8 runtime and the WAVM runtime.
(I have a question open on the envoy-dev Google group for how to do this properly. For now I've adjusted the bazel.release.server_only build to include "--define wasm=wavm".)
I see the following crash when starting to execute WASM code in an extension. This code works fine on the v8 runtime.
What is the status of the WAVM runtime? Is this expected to work?
If so, how do I go about collecting debug information to help determine the problem?
Thanks,
Frank.
The text was updated successfully, but these errors were encountered: