[GH-ISSUE #578] Commit 06f5aa9 crashes librespot #369

Closed
opened 2026-02-27 19:30:15 +03:00 by kerem · 2 comments
Owner

Originally created by @MightyMrMuesli on GitHub (Jan 24, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/578

The changes to cache.rs in commit 06f5aa9 lead to an instant crash of the librespot process on my machine.

systemd[1]: Started Librespot spotify daemon.
librespot[14735]: [2021-01-24T10:38:49Z INFO  librespot] librespot b76543b (2021-01-21). Built on 2021-01-24. Build ID: 8WxUKBsN
librespot[14735]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', core/src/cache.rs:32:45
librespot[14735]: stack backtrace:
librespot[14735]:    0:     0x560a59d60ec0 - <unknown>
librespot[14735]:    1:     0x560a59d88f4c - <unknown>
librespot[14735]:    2:     0x560a59d593c5 - <unknown>
librespot[14735]:    3:     0x560a59d63a75 - <unknown>
librespot[14735]:    4:     0x560a59d63718 - <unknown>
librespot[14735]:    5:     0x560a59d64211 - <unknown>
librespot[14735]:    6:     0x560a59d63d57 - <unknown>
librespot[14735]:    7:     0x560a59d6137c - <unknown>
librespot[14735]:    8:     0x560a59d63cb9 - <unknown>
librespot[14735]:    9:     0x560a59d863f1 - <unknown>
librespot[14735]:   10:     0x560a59d86213 - <unknown>
librespot[14735]:   11:     0x560a59ac37c2 - <unknown>
librespot[14735]:   12:     0x560a59978c7c - <unknown>
librespot[14735]:   13:     0x560a5997cacd - <unknown>
librespot[14735]:   14:     0x560a59966883 - <unknown>
librespot[14735]:   15:     0x560a5997ddf9 - <unknown>
librespot[14735]:   16:     0x560a59d64637 - <unknown>
librespot[14735]:   17:     0x560a5997d572 - <unknown>
librespot[14735]:   18:     0x7f30fee97152 - __libc_start_main
librespot[14735]:   19:     0x560a5995d0be - <unknown>
librespot[14735]:   20:                0x0 - <unknown>
systemd[1]: librespot.service: Main process exited, code=exited, status=101/n/a
systemd[1]: librespot.service: Failed with result 'exit-code'.

I use the Arch Linux AUR package to build librespot and use the following parameters for the service:

ExecStart=/usr/bin/librespot --name librespot \
                             --initial-volume 50 \
                             --disable-audio-cache \
                             --enable-volume-normalisation \
                             --bitrate 320 \
                             --username $USER \
                             --password $PASS \
                             --backend pipe \
                             --device /var/lib/forked-daapd/spotify

But even a minimal configuration example crashes with the same error:

/usr/bin/librespot --name librespot --username $USER --password $PASS

A reversion to commit 4678bf0 fixes the problem.

Originally created by @MightyMrMuesli on GitHub (Jan 24, 2021). Original GitHub issue: https://github.com/librespot-org/librespot/issues/578 The changes to cache.rs in commit 06f5aa9 lead to an instant crash of the librespot process on my machine. ``` systemd[1]: Started Librespot spotify daemon. librespot[14735]: [2021-01-24T10:38:49Z INFO librespot] librespot b76543b (2021-01-21). Built on 2021-01-24. Build ID: 8WxUKBsN librespot[14735]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', core/src/cache.rs:32:45 librespot[14735]: stack backtrace: librespot[14735]: 0: 0x560a59d60ec0 - <unknown> librespot[14735]: 1: 0x560a59d88f4c - <unknown> librespot[14735]: 2: 0x560a59d593c5 - <unknown> librespot[14735]: 3: 0x560a59d63a75 - <unknown> librespot[14735]: 4: 0x560a59d63718 - <unknown> librespot[14735]: 5: 0x560a59d64211 - <unknown> librespot[14735]: 6: 0x560a59d63d57 - <unknown> librespot[14735]: 7: 0x560a59d6137c - <unknown> librespot[14735]: 8: 0x560a59d63cb9 - <unknown> librespot[14735]: 9: 0x560a59d863f1 - <unknown> librespot[14735]: 10: 0x560a59d86213 - <unknown> librespot[14735]: 11: 0x560a59ac37c2 - <unknown> librespot[14735]: 12: 0x560a59978c7c - <unknown> librespot[14735]: 13: 0x560a5997cacd - <unknown> librespot[14735]: 14: 0x560a59966883 - <unknown> librespot[14735]: 15: 0x560a5997ddf9 - <unknown> librespot[14735]: 16: 0x560a59d64637 - <unknown> librespot[14735]: 17: 0x560a5997d572 - <unknown> librespot[14735]: 18: 0x7f30fee97152 - __libc_start_main librespot[14735]: 19: 0x560a5995d0be - <unknown> librespot[14735]: 20: 0x0 - <unknown> systemd[1]: librespot.service: Main process exited, code=exited, status=101/n/a systemd[1]: librespot.service: Failed with result 'exit-code'. ``` I use the [Arch Linux AUR package](https://aur.archlinux.org/packages/librespot-git/) to build librespot and use the following parameters for the service: ``` ExecStart=/usr/bin/librespot --name librespot \ --initial-volume 50 \ --disable-audio-cache \ --enable-volume-normalisation \ --bitrate 320 \ --username $USER \ --password $PASS \ --backend pipe \ --device /var/lib/forked-daapd/spotify ``` But even a minimal configuration example crashes with the same error: `/usr/bin/librespot --name librespot --username $USER --password $PASS` A reversion to commit 4678bf0 fixes the problem.
kerem closed this issue 2026-02-27 19:30:15 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Jan 24, 2021):

Apologies about that, looks like I didn't properly test the PR before merging. Have just pushed github.com/librespot-org/librespot@efabb03631 which should fix the issue, please let me know if it does/doesn't work.

<!-- gh-comment-id:766458752 --> @sashahilton00 commented on GitHub (Jan 24, 2021): Apologies about that, looks like I didn't properly test the PR before merging. Have just pushed https://github.com/librespot-org/librespot/commit/efabb036317a6d57d29f2ae782fddb44963edd44 which should fix the issue, please let me know if it does/doesn't work.
Author
Owner

@MightyMrMuesli commented on GitHub (Jan 25, 2021):

efabb03 fixed the issue. Thank you!

<!-- gh-comment-id:767133755 --> @MightyMrMuesli commented on GitHub (Jan 25, 2021): efabb03 fixed the issue. Thank you!
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#369
No description provided.