koute / not-perf

A sampling CPU profiler for Linux
Apache License 2.0
871 stars 41 forks source link

thread 'main' panicked at 'attempt to subtract with overflow', #11

Open vibhoothi opened 5 years ago

vibhoothi commented 5 years ago

Hi,

So I was trying to profile rav1e using not-perf, so after few seconds it stops, its saying thread 'main' panicked at 'attempt to subtract with overflow' here

vibhoothiiaanand@coneBox:~/not-perf$ RUST_BACKTRACE=1 sudo /home/vibhoothiiaanand/not-perf/target/debug/nperf record -P rav1e -w -o datafile
[2019-08-16T05:54:14Z INFO  nperf::ps] Waiting for process named 'rav1e'...
[2019-08-16T05:54:14Z INFO  nperf::ps] Process 'rav1e' found with PID 4032!
[2019-08-16T05:54:14Z INFO  nperf::profiler] Opening "datafile" for writing...
[2019-08-16T05:54:14Z INFO  nperf::cmd_record] Opening perf events for 4032...
[2019-08-16T05:54:14Z INFO  nperf::profiler] Ready to write profiling data!
[2019-08-16T05:54:15Z INFO  nperf::cmd_record] Enabling perf events...
[2019-08-16T05:54:15Z INFO  nperf::cmd_record] Running...
thread 'main' panicked at 'attempt to subtract with overflow', /home/vibhoothiiaanand/not-perf/nwind/src/dwarf.rs:179:56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[2019-08-16T05:54:42Z INFO  nperf::profiler] Collected 27445 samples in total!
vibhoothiiaanand@coneBox:~/not-perf$

Device Specs: Device: Raspberry Pi 3 B+ RAM: 1 GB Arch: aarch64 Processor: Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz OS: Ubuntu 18.04.2 LTS

vibhoothi commented 5 years ago
vibhoothiiaanand@coneBox ~/not-perf>
env RUST_BACKTRACE=1  /home/vibhoothiiaanand/not-perf/target/debug/nperf record -P rav1e -w -o datafile
[2019-08-16T08:19:16Z INFO  nperf::ps] Waiting for process named 'rav1e'...
[2019-08-16T08:19:32Z INFO  nperf::ps] Process 'rav1e' found with PID 13293!
[2019-08-16T08:19:32Z INFO  nperf::profiler] Opening "datafile" for writing...
[2019-08-16T08:19:32Z INFO  nperf::cmd_record] Opening perf events for 13293...
[2019-08-16T08:19:33Z INFO  nperf::profiler] Ready to write profiling data!
[2019-08-16T08:19:35Z INFO  nperf::cmd_record] Enabling perf events...
[2019-08-16T08:19:35Z INFO  nperf::cmd_record] Running...
thread 'main' panicked at 'attempt to subtract with overflow', /home/vibhoothiiaanand/not-perf/nwind/src/dwarf.rs:179:56
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:212
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:475
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:382
   8: rust_begin_unwind
             at src/libstd/panicking.rs:309
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::panicking::panic
             at src/libcore/panicking.rs:49
  11: nwind::dwarf::dwarf_unwind
             at ./nwind/src/dwarf.rs:179
  12: <nwind::arch::aarch64::Arch as nwind::arch::Architecture>::unwind
             at ./nwind/src/arch/aarch64.rs:216
  13: nwind::unwind_context::UnwindHandle<A>::unwind
             at ./nwind/src/unwind_context.rs:104
  14: <nwind::address_space::AddressSpace<A> as nwind::address_space::IAddressSpace>::unwind
             at ./nwind/src/address_space.rs:1024
  15: nperf::profiler::ProfilingController::generate_sample
             at src/profiler.rs:771
  16: nperf::cmd_record::main
             at src/cmd_record.rs:154
  17: nperf::main_impl
             at src/main.rs:60
  18: nperf::main
             at src/main.rs:78
  19: std::rt::lang_start::{{closure}}
             at /rustc/de7c4e42314c56528640e3b663aa10e0caa6bd9b/src/libstd/rt.rs:64
  20: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:49
  21: std::panicking::try::do_call
             at src/libstd/panicking.rs:294
  22: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:82
  23: std::panicking::try
             at src/libstd/panicking.rs:273
  24: std::panic::catch_unwind
             at src/libstd/panic.rs:388
  25: std::rt::lang_start_internal
             at src/libstd/rt.rs:48
  26: std::rt::lang_start
             at /rustc/de7c4e42314c56528640e3b663aa10e0caa6bd9b/src/libstd/rt.rs:64
  27: main
  28: __libc_start_main
  29: <unknown>
[2019-08-16T08:19:38Z INFO  nperf::profiler] Collected 317 samples in total!

Did pull latest master too, same issue.