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

Update Config::wasm_backtrace in the face of fp-based unwinding #4554

Closed
alexcrichton opened this issue Jul 29, 2022 · 1 comment · Fixed by #4643
Closed

Update Config::wasm_backtrace in the face of fp-based unwinding #4554

alexcrichton opened this issue Jul 29, 2022 · 1 comment · Fixed by #4643
Labels
wasmtime Issues about wasmtime that don't fall into another label

Comments

@alexcrichton
Copy link
Member

With the reimplementation of backtraces in WebAssembly in #4431 there's a few updates to Config which I think would be good to do. For example:

  • Config::wasm_backtrace shouldn't be needed any longer in theory. That being said we may wish to leave it around at least temporarily in case anyone runs into issues with fp-based unwinding.
  • Emission of native debug information (e.g. .eh_frame and .xdata/.pdata) is now separable from wasm backtraces.
  • Registration of .eh_frame and native information on module load time is also separable from wasm backtraces.

I think that we should deprecate Config::wasm_backtrace with a message saying "it will always be enabled in the future, if that causes issues let us know". Additionally I think we can add something like Config::native_unwind_info which defaults to true and configures whether unwinding information is generated and/or registered with the OS. I think this should still be true by default to assist features like RUST_BACKTRACE or anyone else who reads that registered information, but the documentation for this config can indicate that disabling has no impact on Wasmtime itself in terms of features and functionality provided.

@alexcrichton alexcrichton added the wasmtime Issues about wasmtime that don't fall into another label label Jul 29, 2022
@alexcrichton
Copy link
Member Author

cc @fitzgen

fitzgen added a commit to fitzgen/wasmtime that referenced this issue Aug 8, 2022
This method configures whether native unwind information (e.g. `.eh_frame` on
Linux) is generated or not.

This helps integrate with third-party stack capturing tools, such as the system
unwinder or the `backtrace` crate. It does not affect whether Wasmtime can
capture stack traces in Wasm code that it is running or not.

Unwind info is always enabled on Windows, since the Windows ABI requires it.

This configuration option defaults to true.

Additionally, we deprecate `Config::wasm_backtrace` since we can always cheaply
capture stack traces ever since
bytecodealliance#4431.

Fixes bytecodealliance#4554
fitzgen added a commit to fitzgen/wasmtime that referenced this issue Aug 8, 2022
This method configures whether native unwind information (e.g. `.eh_frame` on
Linux) is generated or not.

This helps integrate with third-party stack capturing tools, such as the system
unwinder or the `backtrace` crate. It does not affect whether Wasmtime can
capture stack traces in Wasm code that it is running or not.

Unwind info is always enabled on Windows, since the Windows ABI requires it.

This configuration option defaults to true.

Additionally, we deprecate `Config::wasm_backtrace` since we can always cheaply
capture stack traces ever since
bytecodealliance#4431.

Fixes bytecodealliance#4554
fitzgen added a commit that referenced this issue Aug 8, 2022
This method configures whether native unwind information (e.g. `.eh_frame` on
Linux) is generated or not.

This helps integrate with third-party stack capturing tools, such as the system
unwinder or the `backtrace` crate. It does not affect whether Wasmtime can
capture stack traces in Wasm code that it is running or not.

Unwind info is always enabled on Windows, since the Windows ABI requires it.

This configuration option defaults to true.

Additionally, we deprecate `Config::wasm_backtrace` since we can always cheaply
capture stack traces ever since
#4431.

Fixes #4554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime Issues about wasmtime that don't fall into another label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant