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

[BUG] samply record rustup check fails with error slice index starts at 8 but ends at 0 #467

Open
Matt711 opened this issue Jan 15, 2025 · 0 comments

Comments

@Matt711
Copy link

Matt711 commented Jan 15, 2025

Running the example command in the README gives me the following error.

$ RUST_BACKTRACE=full samply record rustup check
thread '<unnamed>' panicked at /home/nfs/mmurray/.cargo/registry/src/index.crates.io-6f17d22bba15001f/samply-0.12.0/src/linux/perf_event.rs:39:72:
slice index starts at 8 but ends at 0
stack backtrace:
   0:     0xb285f587ae6c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h00b09a4bf39b2d85
   1:     0xb285f58a0374 - core::fmt::write::h7ceb4b8480f8c249
   2:     0xb285f5876bc8 - std::io::Write::write_fmt::h85dd460e8a217df7
   3:     0xb285f587ad20 - std::sys::backtrace::BacktraceLock::print::h9a7ef9a5429d1e7e
   4:     0xb285f587bc3c - std::panicking::default_hook::{{closure}}::h0c27709af3f8d4c6
   5:     0xb285f587ba84 - std::panicking::default_hook::h896b14ac97871c98
   6:     0xb285f587c270 - std::panicking::rust_panic_with_hook::h660add0bcc8a80ea
   7:     0xb285f587c0c4 - std::panicking::begin_panic_handler::{{closure}}::h83d17f92f6c8c9b6
   8:     0xb285f587b368 - std::sys::backtrace::__rust_end_short_backtrace::hab5cb706f3ff2287
   9:     0xb285f587bd84 - rust_begin_unwind
  10:     0xb285f534de8c - core::panicking::panic_fmt::h8267c22f618f324d
  11:     0xb285f58a7534 - core::slice::index::slice_index_order_fail::do_panic::runtime::h12c3554b7d8096dc
  12:     0xb285f534e24c - core::slice::index::slice_index_order_fail::h6b2fdbc9a3c4f969
  13:     0xb285f542e58c - samply::linux::perf_event::EventRef::get::h4b6d02b538ee1504
  14:     0xb285f54950b0 - <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend::hdb59c6bb3a41b9af
  15:     0xb285f53c3554 - samply::linux::perf_group::PerfGroup::consume_events::h7d8de9b2f701f856
  16:     0xb285f53607ec - samply::linux::profiler::run_profiler::h4734d1927aec828d
  17:     0xb285f535141c - std::sys::backtrace::__rust_begin_short_backtrace::h62d2d4fb01261e82
  18:     0xb285f5416b34 - core::ops::function::FnOnce::call_once{{vtable.shim}}::ha469c73f2e0ae4cf
  19:     0xb285f5880e28 - std::sys::pal::unix::thread::Thread::new::thread_start::hd1bb28d1647e61f1
  20:     0xf9f24493d5c8 - start_thread
                               at ./nptl/pthread_create.c:442:8
  21:     0xf9f2449a5edc - thread_start
                               at ./misc/../sysdeps/unix/sysv/linux/aarch64/clone.S:79
  22:                0x0 - <unknown>
stable-aarch64-unknown-linux-gnu - Up to date : 1.84.0 (9fc6b4312 2025-01-07)
rustup - Up to date : 1.27.1
thread 'main' panicked at /home/nfs/mmurray/.cargo/registry/src/index.crates.io-6f17d22bba15001f/samply-0.12.0/src/linux/profiler.rs:200:10:
called `Result::unwrap()` on an `Err` value: "SendError(..)"
stack backtrace:
   0:     0xb285f587ae6c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h00b09a4bf39b2d85
   1:     0xb285f58a0374 - core::fmt::write::h7ceb4b8480f8c249
   2:     0xb285f5876bc8 - std::io::Write::write_fmt::h85dd460e8a217df7
   3:     0xb285f587ad20 - std::sys::backtrace::BacktraceLock::print::h9a7ef9a5429d1e7e
   4:     0xb285f587bc3c - std::panicking::default_hook::{{closure}}::h0c27709af3f8d4c6
   5:     0xb285f587ba84 - std::panicking::default_hook::h896b14ac97871c98
   6:     0xb285f587c270 - std::panicking::rust_panic_with_hook::h660add0bcc8a80ea
   7:     0xb285f587c0c4 - std::panicking::begin_panic_handler::{{closure}}::h83d17f92f6c8c9b6
   8:     0xb285f587b368 - std::sys::backtrace::__rust_end_short_backtrace::hab5cb706f3ff2287
   9:     0xb285f587bd84 - rust_begin_unwind
  10:     0xb285f534de8c - core::panicking::panic_fmt::h8267c22f618f324d
  11:     0xb285f534e1f0 - core::result::unwrap_failed::hfb7b21611a75dc75
  12:     0xb285f535dd2c - samply::linux::profiler::start_recording::h60b2ad585476822d
  13:     0xb285f5432064 - samply::main::hab6443e7ce7d34db
  14:     0xb285f535156c - std::sys::backtrace::__rust_begin_short_backtrace::h84a90e64c5392a0f
  15:     0xb285f54af230 - std::rt::lang_start::{{closure}}::h8eba915c090c2439
  16:     0xb285f58703c4 - std::rt::lang_start_internal::h647ceeb55972e3a5
  17:     0xb285f5439064 - main
  18:     0xf9f2448e73fc - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  19:     0xf9f2448e74cc - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  20:     0xb285f534e4f0 - _start
  21:                0x0 - <unknown>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant