Skip to content
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

wasm: enable WAVM's stack unwinding feature #13792

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Oct 28, 2020

This PR enables WAVM's stack unwind feature, which enhance WASM extension developers debuggability dramatically.
Without WAVM_ENABLE_UNWIND=on, the returned call stack is always empty as you can see here.

The corresponding PR in proxy-wasm-cpp-host is here: proxy-wasm/proxy-wasm-cpp-host#84

The stack trace message is something like this:

[2020-10-28 14:24:10.551][979699][trace][wasm] [source/extensions/common/wasm/wasm_vm.cc:29] Function proxy_on_tick failed:
WAVM message: wavm.reachedUnreachable
wasm backrace:
  1: wasm!helloworld!runtime._panic+7
  2: wasm!helloworld!command-line-arguments.C+2
  3: wasm!helloworld!command-line-arguments.B+0
  4: wasm!helloworld!command-line-arguments.A+0
  5: wasm!helloworld!(*command-line-arguments.helloWorld).OnTick+74
  6: wasm!helloworld!proxy_on_tick+0

Signed-off-by: mathetake takeshi@tetrate.io


cc @lizan @PiotrSikora

Signed-off-by: mathetake <takeshi@tetrate.io>
@mattklein123 mattklein123 merged commit f49c7dd into envoyproxy:master Oct 28, 2020
@PiotrSikora
Copy link
Contributor

@mathetake in the future, you might want to include proxy-wasm-cpp-host update in bazel/repository_locations.bzl that points to your fork while the proxy-wasm-cpp-host PR is still under review. This way, the CI tests the complete change, instead of only the Envoy part, and it signals that this PR is still blocked on the proxy-wasm-cpp-host PR.

In this particular case, the merged PR is a bit useless by itself.

@mathetake mathetake deleted the wasm-wavm-stackunwind branch October 29, 2020 02:12
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 30, 2020
* master: (83 commits)
  tls: Typesafe tls slots (envoyproxy#13789)
  docs(example): Correct URL for caching example page (envoyproxy#13810)
  [fuzz] Made health check fuzz more efficient (envoyproxy#13747)
  rtds: properly scope rtds stats (envoyproxy#13764)
  http: fixing a bug with IPv6 hosts (envoyproxy#13798)
  connection: Remember transport socket read resumption requests and replay them when re-enabling read. (envoyproxy#13772)
  network: adding some accessors for ALPN work. (envoyproxy#13785)
  docs: added a step about how to handle platform specific extensions (envoyproxy#13759)
  Fix identation in ip transparency code snippet (envoyproxy#13743)
  wasm: enable WAVM's stack unwinding feature (envoyproxy#13792)
  log: set route name for direct response (envoyproxy#13683)
  Use nghttp2 as external dependsncy in protocol_constraints_lib (envoyproxy#13763)
  [Windows] Update windows dev docs (envoyproxy#13741)
  cel: patch thread safety issue (envoyproxy#13739)
  Windows: Fix ssl_socket_test (envoyproxy#13264)
  apple dns: add fake api test suite (envoyproxy#13780)
  overload: scale selected timers in response to load (envoyproxy#13475)
  examples: Add dynamic configuration (control plane) sandbox (envoyproxy#13746)
  Removed exception in getResponseStatus() (envoyproxy#13314)
  network: add timeout for transport connect (envoyproxy#13610)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants