Skip to content

Librespot panics on attempt to multiply with overflow #1680

@fenuks

Description

@fenuks

Description

Librespot sometimes panics with

thread 'main' panicked at audio/src/fetch/receive.rs:119:30:
attempt to multiply with overflow

(unfortunately backtrace has no symbols)

Version

librespot 0.8.0 VERGEN_IDEMPOTENT_OUTPUT (Built on 2025-10-19, Build ID: 1760891865, Profile: release)

How to reproduce

  1. Launch librespot --device-type speaker --initial-volume 100 (extra args doesn't matter, but I use them)
  2. Connect with Spotify browser or mobile app
  3. Listen to some music (e.g. 1, 2 or 3 caused crashes, but there are many more tracks that crash, e.g. listening to Clair Obscur soundtrack, but apparently it doesn't happen always for the same track)
  4. See the panic

Log

[2026-01-24T13:13:59Z INFO  librespot_playback::player] <Spring Meadows - Get Up! For Lumière!> (239000 ms) loaded
[2026-01-24T13:14:09Z TRACE librespot_core::dealer] Sent ping
[2026-01-24T13:14:12Z WARN  librespot_core::dealer] Websocket peer does not respond.
[2026-01-24T13:14:12Z DEBUG librespot_core::dealer] Dropping receive task
[2026-01-24T13:14:12Z DEBUG librespot_core::dealer] Dropping send task
[2026-01-24T13:14:15Z TRACE librespot_core::dealer] Sent ping
[2026-01-24T13:14:15Z TRACE librespot_connect::spirc] Received connection ID update: "<redacted>"
[2026-01-24T13:14:15Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/<redacted>?product=0&country=PL&salt=<redacted>
[2026-01-24T13:14:16Z DEBUG librespot_connect::spirc] successfully put connect state for <redacted> with connection-id <redacted>
[2026-01-24T13:14:16Z INFO  librespot_connect::spirc] active device is <redacted> with session <redacted>
[2026-01-24T13:14:16Z TRACE librespot_core::dealer] Received pong
[2026-01-24T13:14:26Z DEBUG librespot_connect::state::tracks] finished filling up next_tracks (80)
[2026-01-24T13:14:26Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: false, buffering: true
[2026-01-24T13:14:26Z DEBUG librespot_playback::player] command=Load(SpotifyUri("spotify:track:3S4QedtP0f3HxMVRXHEqxv"), true, 0)
[2026-01-24T13:14:26Z TRACE librespot_connect::spirc] ==> Playing
[2026-01-24T13:14:26Z DEBUG librespot_connect::state] updated connect play status playing: true, paused: false, buffering: false
[2026-01-24T13:14:26Z DEBUG librespot_connect::state] update position to 0:00 at 13:14:26.518
[2026-01-24T13:14:26Z DEBUG librespot_core::http_client] Requesting https://gew4-spclient.spotify.com:443/connect-state/v1/devices/<redacted>?product=0&country=PL&salt=<redacted>
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 204 ms
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 434 kbps
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 337 kbps
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 58 ms
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 1551 kbps
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 30 ms
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 4504 kbps
[2026-01-24T13:14:26Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 2499 kbps
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 183 ms
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 1475 kbps
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 4569 kbps
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 22 ms
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 8526 kbps
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 10093 kbps
[2026-01-24T13:14:27Z TRACE librespot_audio::fetch::receive] Throughput now estimated as: 6833 kbps
[2026-01-24T13:14:28Z TRACE librespot_audio::fetch::receive] Time to first byte now estimated as: 372 ms

thread 'main' panicked at audio/src/fetch/receive.rs:119:30:
attempt to multiply with overflow
stack backtrace:
   0:   0x887a24 - <unknown>
   1:   0x588a14 - <unknown>
   2:   0x8a92c8 - <unknown>
   3:   0x887908 - <unknown>
   4:   0x89d7dc - <unknown>
   5:   0x887f00 - <unknown>
   6:   0x887e58 - <unknown>
   7:   0x89cef0 - <unknown>
   8:   0x4e8e3c - <unknown>
   9:   0x4e8904 - <unknown>
  10:   0x5f7bf8 - <unknown>
  11:   0x5f6b50 - <unknown>
  12:   0x578760 - <unknown>
  13:   0x546518 - <unknown>
  14:   0x57f950 - <unknown>

Host

  • OS: OpenWrt 24.10.4
  • Platform: Linksys WRT3200ACM router

Additional context

Panic is not deterministic, it often doesn't occur for the same track, but
happens quite regularly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions