Skip to content

Conversation

@Arneball
Copy link
Contributor

@Arneball Arneball commented Jan 23, 2026

In release builds there were just seemingly random stopped playbacks, and keeping pulseaudio open (thus keeping my amplifier on, because it polls pulseaudio).

But in debug builds I see this panic. This is a 32bit raspberry pi.

  thread 'main' panicked at audio/src/fetch/receive.rs:123:30:
  attempt to multiply with overflow
  stack backtrace:
  0:  0x12e31a0 - std::backtrace_rs::backtrace::libunwind::trace::h5d838b11a2fb0154
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
  1:  0x12e31a0 - std::backtrace_rs::backtrace::trace_unsynchronized::h01349b8d4bfea0a9
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
  2:  0x12e31a0 - std::sys::backtrace::_print_fmt::h7e0ec0d087a40533
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:66:9
  3:  0x12e31a0 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hd3dc17079bb164c9
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:39:26
  4:  0x131274c - core::fmt::rt::Argument::fmt::hd891de0f513d4be8
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/fmt/rt.rs:177:76
  5:  0x131274c - core::fmt::write::h0adef8a48142adfb
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/fmt/mod.rs:1440:21
  6:  0x12de118 - std::io::Write::write_fmt::hab4529fb9f24681e
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/io/mod.rs:1887:15
  7:  0x12e3034 - std::sys::backtrace::BacktraceLock::print::h192621e84d520b26
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:42:9
  8:  0x12e44cc - std::panicking::default_hook::{{closure}}::h039d3dcc9e1e0474
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:295:22
  9:  0x12e4268 - std::panicking::default_hook::hd1f3fb0c179c213f
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:322:9
  10:  0x12e4da4 - std::panicking::rust_panic_with_hook::h1db2d9744df8f664
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:828:13
  11:  0x12e49f4 - std::panicking::begin_panic_handler::{{closure}}::h6889a9fc597e3903
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:694:13
  12:  0x12e3750 - std::sys::backtrace::__rust_end_short_backtrace::h9eb2c247e5f04963
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:168:18
  13:  0x12e46d0 - rust_begin_unwind
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
  14:   0x4aca80 - core::panicking::panic_fmt::h85d969163576833b
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
  15:   0x4ad1d0 - core::panicking::panic_const::panic_const_mul_overflow::hb86def89255d28ac
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:178:21
  16:   0x921ed0 - librespot_audio::fetch::receive::receive_data::{{closure}}::hc1a435888c1a7a71
  at /home/pi/librespot/audio/src/fetch/receive.rs:123:30
  17:   0x93696c - tokio::runtime::task::core::Core<T,S>::poll::{{closure}}::h956ba50e45daff54
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/core.rs:365:17
  18:   0x936590 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::h301a163423532c64
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/loom/std/unsafe_cell.rs:16:9
  19:   0x936590 - tokio::runtime::task::core::Core<T,S>::poll::h9833f4d207131726
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/core.rs:354:13
  20:   0x92b720 - tokio::runtime::task::harness::poll_future::{{closure}}::h40453c7820943b8a
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/harness.rs:535:19
  21:   0x93d28c - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hebebc9890d448ac1
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panic/unwind_safe.rs:272:9
  22:   0x938f08 - std::panicking::try::do_call::hdc1336d2178517b9
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:584:40
  23:   0x938500 - __rust_try
  24:   0x938230 - std::panicking::try::h0ed285dcaf5afa5f
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:547:19
  25:   0x938230 - std::panic::catch_unwind::hcbcc77faa7e14414
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panic.rs:358:14
  26:   0x92afac - tokio::runtime::task::harness::poll_future::h663b2159a8bbc530
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/harness.rs:523:18
  27:   0x92be58 - tokio::runtime::task::harness::Harness<T,S>::poll_inner::hea612f4855422ade
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/harness.rs:210:27
  28:   0x92c9bc - tokio::runtime::task::harness::Harness<T,S>::poll::hffc800ff9423a9a7
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/harness.rs:155:15
  29:   0x93ae94 - tokio::runtime::task::raw::poll::ha38f1d2a3e77362f
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/raw.rs:325:5
  30:   0xf79ce0 - tokio::runtime::task::raw::RawTask::poll::ha1ac536696fb660d
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/raw.rs:255:18
  31:   0xbf35e0 - tokio::runtime::task::LocalNotified<S>::run::h5b5656112ae671a6
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/task/mod.rs:509:9
  32:   0x5b52d0 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::h3a450e5faad86c86
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:789:25
  33:   0x5b291c - tokio::task::coop::with_budget::h514f50fad5fe6980
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/task/coop/mod.rs:167:5
  34:   0x5b291c - tokio::task::coop::budget::h45ee2610fee65880
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/task/coop/mod.rs:133:5
  35:   0x5b291c - tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}::ha388085fd04fa656
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:368:43
  36:   0x5b19cc - tokio::runtime::scheduler::current_thread::Context::enter::h52b32fe8bef292e3
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:432:19
  37:   0x5b2258 - tokio::runtime::scheduler::current_thread::Context::run_task::h86bbd04df2a589ac
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:368:23
  38:   0x5b50cc - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::h882d9ad22deec6cf
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:785:35
  39:   0x5b3738 - tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}::h1d74d6cd7d6ccd28
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:829:68
  40:   0x5b67a8 - tokio::runtime::context::scoped::Scoped<T>::set::h5d7a5d97a37c7ff9
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/context/scoped.rs:40:9
  41:   0x51f3a8 - tokio::runtime::context::set_scheduler::{{closure}}::hd9acba127e436f45
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/context.rs:176:26
  42:   0x528b30 - std::thread::local::LocalKey<T>::try_with::h4f4e99fb34c01f4b
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/thread/local.rs:308:12
  43:   0x527d9c - std::thread::local::LocalKey<T>::with::hf086de8e4044e4de
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/thread/local.rs:272:9
  44:   0x51f2d8 - tokio::runtime::context::set_scheduler::hbc67d8ec18dcba76
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/context.rs:176:9
  45:   0x5b3240 - tokio::runtime::scheduler::current_thread::CoreGuard::enter::ha1447d4f11ad7a83
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:829:27
  46:   0x5b37f0 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h278adfb129ed5ce6
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:729:19
  47:   0x5adfd0 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}::hb745e5990cb87db4
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:200:28
  48:   0x55adcc - tokio::runtime::context::runtime::enter_runtime::h7abcb84190375450
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/context/runtime.rs:65:16
  49:   0x5ad2d8 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::h8bd0717f1ca31189
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:188:9
  50:   0x4e85d4 - tokio::runtime::runtime::Runtime::block_on_inner::h9ef91b8163fc785e
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/runtime.rs:368:47
  51:   0x4e8cc8 - tokio::runtime::runtime::Runtime::block_on::hc6a5bd9dd0181cf4
  at /home/pi/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/runtime/runtime.rs:340:13
  52:   0x5a0e9c - librespot::main::h402a7313d3f481db
  at /home/pi/librespot/src/main.rs:2108:5
  53:   0x5c0db8 - core::ops::function::FnOnce::call_once::h96666ed5c7351a60
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/ops/function.rs:250:5
  54:   0x5139d8 - std::sys::backtrace::__rust_begin_short_backtrace::h30e1a5594199af8d
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/sys/backtrace.rs:152:18
  55:   0x51c0dc - std::rt::lang_start::{{closure}}::h4ba7439166dd3fc6
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:195:18
  56:  0x12d34b0 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hbcd5ec90e0190569
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/ops/function.rs:284:13
  57:  0x12d34b0 - std::panicking::try::do_call::h2ece9808277dbad4
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:584:40
  58:  0x12d34b0 - std::panicking::try::hec4f26dd744fab00
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:547:19
  59:  0x12d34b0 - std::panic::catch_unwind::h54846c7de2f08558
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panic.rs:358:14
  60:  0x12d34b0 - std::rt::lang_start_internal::{{closure}}::hd1cb3b5bc77e987f
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:174:48
  61:  0x12d34b0 - std::panicking::try::do_call::h199a67fc8ac74d98
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:584:40
  62:  0x12d34b0 - std::panicking::try::h822e419404e86fc0
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:547:19
  63:  0x12d34b0 - std::panic::catch_unwind::h6429f4c61d6c92ca
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panic.rs:358:14
  64:  0x12d34b0 - std::rt::lang_start_internal::h6ef31cf562bcc908
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:174:20
  65:   0x51c0ac - std::rt::lang_start::h0b94edd947f21f1d
  at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/rt.rs:194:17
  66:   0x5a0f3c - main
  67: 0x76a72768 - __libc_start_main
  at /build/glibc-lsttuD/glibc-2.28/csu/libc-start.c:308:16
  [2026-01-23T09:17:08Z DEBUG librespot_audio::fetch] Downloading file 6d15a62ddfe841cb0c13ba7271fc5370df4ef659 complete
  [2026-01-23T09:18:56Z DEBUG librespot_core::session] Session strong=6 weak=8
  [2026-01-23T09:20:56Z DEBUG librespot_core::session] Session strong=6 weak=8

Fixes #1680

Copy link
Member

@photovoltex photovoltex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an changelog entry for this change and then this is good to go :D

Copy link
Member

@photovoltex photovoltex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix :)

@photovoltex photovoltex merged commit 7ae3436 into librespot-org:dev Jan 28, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

Librespot panics on attempt to multiply with overflow

2 participants