-
Notifications
You must be signed in to change notification settings - Fork 799
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
Support for Wasm Coredump #3578
Comments
Hey @xtuc , thanks for opening the issue. We would love to support wasm coredumps, but we are a bit constrained on resources. |
@syrusakbary I will give it a try. I believe I can use the Backtrace information when a RuntimeError and/or Trap occurs. Please free to send any other pointers if you have something in mind. |
Awesome, I believe RuntimeError and backtrace info as you mentioned should make wasm coredump possible. If you have any questions upon implementing things please let us know on this thread and we will assist! |
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmtime --coredump-on-trap=/path/to/coredump/file module.wasm ``` Refs wasmerio#3578
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmer --coredump-on-trap=/path/to/coredump/file module.wasm ``` Refs wasmerio#3578
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmer --coredump-on-trap=/path/to/coredump/file module.wasm ``` Refs wasmerio#3578
@syrusakbary I opened #3626 for adding basic coredump generation using the existing APIs. It's inpired by the change I did for wasmtime and wrote some documentation: https://github.com/bytecodealliance/wasmtime/blob/db931d7a93208738b8106e8d8c1a4afc8efaca6d/docs/examples-coredump.md. |
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmer --coredump-on-trap=/path/to/coredump/file module.wasm ``` Refs wasmerio#3578
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmer --coredump-on-trap=/path/to/coredump/file module.wasm ``` See docs/en/examples-coredump.md. Refs wasmerio#3578
This change adds a basic coredump generation after a WebAssembly trap was entered. The coredump includes rudimentary stack / process debugging information. A new CLI argument is added to enable coredump generation: ``` wasmer --coredump-on-trap=/path/to/coredump/file module.wasm ``` See docs/en/examples-coredump.md. Refs wasmerio#3578
Basic coredump generation has been merged (thanks!). Now, to have the complete debugger experience, we need to collect the following information:
|
Probably. In the past (wasmer 0.x) we used LLVM stack maps for tracking traps, so I believe it shall be doable |
Probably @ptitSeb can chime in with more thoughts here |
I guess we are talking about tracking the locals in eh_frame/dwarf stuff. I would like to work on something like that yes, but I'll probably start on the singleplass, because this is were I have the more control. |
PR merged, closing. |
The merged PR only has a limited support to Wasmer, most of the features aren't implemented because we are missing access to locals and main memory. |
Should we keep the issue open then @xtuc? Would you like to work on the missing features? |
@syrusakbary I'm not familiar enough to do it myself |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale. |
Motivation
When the Wasm instance traps, it's sometimes difficult to understand what happened. Post-mortem debugging using coredumps (which is extensively used in native environment) would be helpful for investigating and fixing crashes.
Demo from a developer's point of view: https://github.com/xtuc/wasmgdb/wiki/Demo.
Proposed solution
Implement Wasm coredumps as specified by https://github.com/WebAssembly/tool-conventions/blob/main/Coredump.md. Note that the spec is early and subject to changes. Feedback very welcome!
Additional context
Wasm coredump is especially useful for serverless environment where production binaries are stripped and/or have access to limited logging.
The text was updated successfully, but these errors were encountered: