[GH-ISSUE #1680] Librespot panics on attempt to multiply with overflow #763

Closed
opened 2026-02-27 19:32:21 +03:00 by kerem · 3 comments
Owner

Originally created by @fenuks on GitHub (Jan 24, 2026).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1680

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.

Originally created by @fenuks on GitHub (Jan 24, 2026). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1680 ### 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](https://open.spotify.com/track/28B63TaKfE79pwKtp3Ujos), [2](https://open.spotify.com/track/0t4CjC2klizSzVdc3TNXKk) or [3](https://open.spotify.com/track/3inLWRm9YKSixtaE9rjvVq) 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.
kerem 2026-02-27 19:32:21 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kingosticks commented on GitHub (Jan 24, 2026):

Sounds like #1678 maybe? Build using debug profile for symbols.

<!-- gh-comment-id:3795488715 --> @kingosticks commented on GitHub (Jan 24, 2026): Sounds like #1678 maybe? Build using debug profile for symbols.
Author
Owner

@fenuks commented on GitHub (Jan 24, 2026):

Yes, content of the line is the same as on main branch, only line numbers have changed. In v0.8.0 it was here. I'll check this patch if I manage to build it.

<!-- gh-comment-id:3795632476 --> @fenuks commented on GitHub (Jan 24, 2026): Yes, content of the line is the same as on main branch, only line numbers have changed. In v0.8.0 it was [here](https://github.com/librespot-org/librespot/blob/d36f9f1907e8cc9d68a93f8ebc6b627b1bf7267d/audio/src/fetch/receive.rs#L119). I'll check this patch if I manage to build it.
Author
Owner

@fenuks commented on GitHub (Jan 25, 2026):

Librespot with patch #1678 doesn't crash anymore.

<!-- gh-comment-id:3796628772 --> @fenuks commented on GitHub (Jan 25, 2026): Librespot with patch #1678 doesn't crash anymore.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#763
No description provided.