Open gen-xu opened 1 year ago
I'm seeing similar errors also when using pprof-rs with libunwind on Mac M2:
libunwind::CFI_Parser<libunwind::LocalAddressSpace>::decodeFDE(libunwind::LocalAddressSpace&, unsigned long, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::FDE_Info*, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::CIE_Info*, bool) (@libunwind::CFI_Parser<libunwind::LocalAddressSpace>::decodeFDE(libunwind::LocalAddressSpace&, unsigned long, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::FDE_Info*, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::CIE_Info*, bool):15)
libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::step() (@libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::step():55)
_Unwind_Backtrace (@_Unwind_Backtrace:90)
backtrace::backtrace::libunwind::trace (/Users/alindima/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93)
backtrace::backtrace::trace_unsynchronized (/Users/alindima/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66)
<pprof::backtrace::backtrace_rs::Trace as pprof::backtrace::Trace>::trace (/Users/alindima/Desktop/code/pprof-rs/src/backtrace/backtrace_rs.rs:23)
perf_signal_handler (/Users/alindima/Desktop/code/pprof-rs/src/profiler.rs:291)
_sigtramp (@_sigtramp:17)
...
I got the same error message. This is on an Apple M1 Pro running OSX 13.5.2 and Rust 1.72.0. I am fairly confident that the behavior changed upon OSX upgrade, although I'm not sure which upgrade, and hypothetically the behavior could have changed when I upgraded Rust. Regardless, profiling always crashes now.
I got the same error message. This is on an Apple M1 Pro running OSX 13.5.2 and Rust 1.72.0. I am fairly confident that the behavior changed upon OSX upgrade, although I'm not sure which upgrade, and hypothetically the behavior could have changed when I upgraded Rust. Regardless, profiling always crashes now.
I'm getting a Macbook today. Maybe I can try to reproduce the bug on it :laughing: .
The backtrace provided by @alindima above is really helpful and I think I have known the problem, just need to verify / validate the fix :beers: .
rust panic with following error message
after some investigation these two lines in
frame_pointer.rs
turned out to be the root cause