-
Notifications
You must be signed in to change notification settings - Fork 37
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
Rust-Based Stack Traces Corrupt When Tracy Enabled #101
Comments
Huh, this is annoying. I imagine what happens is that one of the libbacktraces end up getting precedence and that one that ends up getting called is this one. I wonder if we could avoid including the vendored libbacktrace and instead rely on what libstd gives us... |
I thought backtrace-rs is now not using libbacktace at all - I was wondering if there was some race when using dbghelp |
Don't mean to derail this issue, but is there a way of solving it that also provides Tracy with rusty backtraces, or would that have to be done upstream? Not only are the panic stack traces emitted by Rust wrong, but Tracy's stack traces (when running the profiled process as admin) on Windows are similarly useless. |
I have a hunch that this is two sides of the same issue- whatever is happening is happening to both tracy's backtraces and rust backtraces |
I'll be making a release based on just-released tracy 0.11 so it would be worthwhile to test if the new version suffers from the same issue. At the same time I can't help but notice that tracy now has all sorts of additional options for stack trace handling (e.g. to use libunwind.) While those options are currently not exposed in any way from the bindings, it would be another worthwhile test to see if using them helps in any way. |
You're quick! I've tested on |
A real doozy of an issue here. I honestly don't know if this is a rust_tracy_client problem, a backtrace-rs problem, or a tracy problem, I'm starting here as a first line of action.
Clone this repository: https://github.com/cwfitzgerald/tracy-client-stacktrace-issue on a machine running Windows.
cargo run
returns a stacktrace like normal. This is basically just a program which instantly panics.Normal Stacktrace
cargo run --features enable
now turns on tracy_client, then panics. Pulls a completely nonsensical stacktrace.Nonsense
If I run this in the visual studio debugger with Break on All C++ exceptions enabled, visual studio gives a sane backtrace, so the stack itself seems correct.
VS Backtrace
This happens with all features disabled, only
enable
. This example usesmanual-lifetime
, but this happens without.The text was updated successfully, but these errors were encountered: