Skip to content

wavm: emit stack trace when an exception happens #84

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

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

mathetake
Copy link
Contributor

@mathetake mathetake commented Oct 28, 2020

this PR emits call stack trace when exception happens in WAVM just like V8 (#66)

this requires a change in the WAVM library used in Envoy: envoyproxy/envoy#13792

[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

Signed-off-by: mathetake <takeshi@tetrate.io>
@mathetake
Copy link
Contributor Author

mathetake commented Oct 29, 2020

blocker: #49

We couldn't tell even if this compiles though I've already tested in my local machine. Before we merge this PR, I will write WAVM tests, and then test this PR

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to block this on tests in this repo if you can open a PR in Envoy to make sure that this doesn't break anything.

Signed-off-by: mathetake <takeshi@tetrate.io>
Signed-off-by: mathetake <takeshi@tetrate.io>
@PiotrSikora PiotrSikora merged commit 015b161 into proxy-wasm:master Oct 29, 2020
@mathetake mathetake deleted the wavm-stacktrace branch October 29, 2020 11:01
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.

2 participants