[GH-ISSUE #94] Thread 'main' panicked at 'connection closed' #83

Closed
opened 2026-02-27 19:28:44 +03:00 by kerem · 14 comments
Owner

Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/94

Issue by JoakimLindbom
Tuesday Oct 24, 2017 at 11:35 GMT
Originally opened as https://github.com/plietar/librespot/issues/262


Randomly playback is stopped.
I'm running librespot 8971d3a (2017-10-05). Built on 2017-10-05. Build ID: POyxPQVg on a Raspberry Pi 3 with raspotify. Using ALSA with an Hifiberry AMP+
Kernel: 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l

Oct 24 13:04:08 myplayer librespot[3472]: thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:819:4
Oct 24 13:04:08 myplayer librespot[3472]: note: Run with `RUST_BACKTRACE=1` for a backtrace.
Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Main process exited, code=exited, status=101/n/a
Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Unit entered failed state.
Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Failed with result 'exit-code'.
Oct 24 13:04:18 myplayer systemd[1]: raspotify.service: Service hold-off time over, scheduling restart.
Oct 24 13:04:18 myplayer systemd[1]: Stopped Raspotify.
Oct 24 13:04:18 myplayer systemd[1]: Starting Raspotify...
Oct 24 13:04:18 myplayer systemd[1]: Started Raspotify.
Oct 24 13:04:18 myplayer librespot[3766]: INFO:librespot: librespot 8971d3a (2017-10-05). Built on 2017-10-05. Build ID: POyxPQVg
Oct 24 13:04:19 myplayer librespot[3766]: INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-jws4.ap.spotify.com:4070"
Originally created by @sashahilton00 on GitHub (Jan 29, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/94 <a href="https://github.com/JoakimLindbom"><img src="https://avatars3.githubusercontent.com/u/3755877?v=4" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [JoakimLindbom](https://github.com/JoakimLindbom)** _Tuesday Oct 24, 2017 at 11:35 GMT_ _Originally opened as https://github.com/plietar/librespot/issues/262_ ---- Randomly playback is stopped. I'm running librespot 8971d3a (2017-10-05). Built on 2017-10-05. Build ID: POyxPQVg on a Raspberry Pi 3 with raspotify. Using ALSA with an Hifiberry AMP+ Kernel: 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l ``` Oct 24 13:04:08 myplayer librespot[3472]: thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:819:4 Oct 24 13:04:08 myplayer librespot[3472]: note: Run with `RUST_BACKTRACE=1` for a backtrace. Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Main process exited, code=exited, status=101/n/a Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Unit entered failed state. Oct 24 13:04:08 myplayer systemd[1]: raspotify.service: Failed with result 'exit-code'. Oct 24 13:04:18 myplayer systemd[1]: raspotify.service: Service hold-off time over, scheduling restart. Oct 24 13:04:18 myplayer systemd[1]: Stopped Raspotify. Oct 24 13:04:18 myplayer systemd[1]: Starting Raspotify... Oct 24 13:04:18 myplayer systemd[1]: Started Raspotify. Oct 24 13:04:18 myplayer librespot[3766]: INFO:librespot: librespot 8971d3a (2017-10-05). Built on 2017-10-05. Build ID: POyxPQVg Oct 24 13:04:19 myplayer librespot[3766]: INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-jws4.ap.spotify.com:4070" ```
kerem 2026-02-27 19:28:44 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tabell
Friday Oct 27, 2017 at 15:03 GMT


Are you able to turn on backtraces and make it happen again?

<!-- gh-comment-id:361277428 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tabell"><img src="https://avatars3.githubusercontent.com/u/5386353?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tabell](https://github.com/tabell)** _Friday Oct 27, 2017 at 15:03 GMT_ ---- Are you able to turn on backtraces and make it happen again?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tenortim
Monday Oct 30, 2017 at 05:16 GMT


I'm running an older build, but basically hitting the same problem randomly. Build is
INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb
crash is
thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:794

I'll get the full backtrace, but I need to carve out time to look at this.
It doesn't happen immediately but relatively quickly.

<!-- gh-comment-id:361277452 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tenortim"><img src="https://avatars3.githubusercontent.com/u/11024072?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tenortim](https://github.com/tenortim)** _Monday Oct 30, 2017 at 05:16 GMT_ ---- I'm running an older build, but basically hitting the same problem randomly. Build is INFO:librespot: librespot cc9dba8 (2017-03-26). Built on 2017-07-17. Build ID: 8zQE3Bpb crash is thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:794 I'll get the full backtrace, but I need to carve out time to look at this. It doesn't happen immediately but relatively quickly.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tenortim
Sunday Nov 05, 2017 at 00:16 GMT


Full backtrace:

thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:794
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:511
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:495
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:471
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:69
   9: core::option::expect_failed
             at /checkout/src/libcore/option.rs:794
  10: <futures::future::map::Map<A, F> as futures::future::Future>::poll
  11: <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll
  12: tokio_core::reactor::Core::poll
  13: librespot::main
  14: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  15: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:433
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:57
  16: __libc_start_main

<!-- gh-comment-id:361277483 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tenortim"><img src="https://avatars3.githubusercontent.com/u/11024072?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tenortim](https://github.com/tenortim)** _Sunday Nov 05, 2017 at 00:16 GMT_ ---- Full backtrace: ``` thread 'main' panicked at 'connection closed', /checkout/src/libcore/option.rs:794 stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::_print at /checkout/src/libstd/sys_common/backtrace.rs:71 2: std::panicking::default_hook::{{closure}} at /checkout/src/libstd/sys_common/backtrace.rs:60 at /checkout/src/libstd/panicking.rs:355 3: std::panicking::default_hook at /checkout/src/libstd/panicking.rs:371 4: std::panicking::rust_panic_with_hook at /checkout/src/libstd/panicking.rs:549 5: std::panicking::begin_panic at /checkout/src/libstd/panicking.rs:511 6: std::panicking::begin_panic_fmt at /checkout/src/libstd/panicking.rs:495 7: rust_begin_unwind at /checkout/src/libstd/panicking.rs:471 8: core::panicking::panic_fmt at /checkout/src/libcore/panicking.rs:69 9: core::option::expect_failed at /checkout/src/libcore/option.rs:794 10: <futures::future::map::Map<A, F> as futures::future::Future>::poll 11: <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll 12: tokio_core::reactor::Core::poll 13: librespot::main 14: __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:98 15: std::rt::lang_start at /checkout/src/libstd/panicking.rs:433 at /checkout/src/libstd/panic.rs:361 at /checkout/src/libstd/rt.rs:57 16: __libc_start_main ```
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Sunday Jan 14, 2018 at 22:12 GMT


@tenortim I get an identical backtrace quite regularly. Did you or anyone manage to resolve it?

<!-- gh-comment-id:361277509 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Sunday Jan 14, 2018 at 22:12 GMT_ ---- @tenortim I get an identical backtrace quite regularly. Did you or anyone manage to resolve it?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Sunday Jan 14, 2018 at 22:16 GMT


This appears to happen even when librespot is idle, about every 30-60 seconds or so.

<!-- gh-comment-id:361277526 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Sunday Jan 14, 2018 at 22:16 GMT_ ---- This appears to happen even when librespot is idle, about every 30-60 seconds or so.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by kingosticks
Monday Jan 15, 2018 at 00:10 GMT


I don't get this. Could it be a problem with a specific access point?

<!-- gh-comment-id:361277546 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/kingosticks"><img src="https://avatars2.githubusercontent.com/u/934824?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [kingosticks](https://github.com/kingosticks)** _Monday Jan 15, 2018 at 00:10 GMT_ ---- I don't get this. Could it be a problem with a specific access point?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Monday Jan 15, 2018 at 10:10 GMT


@kingosticks I can confirm this is happening with multiple (at least 5) access points.

<!-- gh-comment-id:361277574 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Monday Jan 15, 2018 at 10:10 GMT_ ---- @kingosticks I can confirm this is happening with multiple (at least 5) access points.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Monday Jan 15, 2018 at 10:10 GMT


I'm afraid I know very little Rust, but have decent Unix experience, so let me know if I can provide any information to debug this.

<!-- gh-comment-id:361277596 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Monday Jan 15, 2018 at 10:10 GMT_ ---- I'm afraid I know very little Rust, but have decent Unix experience, so let me know if I can provide any information to debug this.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Monday Jan 15, 2018 at 14:24 GMT


OK, this is odd. It only seems to happen when running inside a container running on Docker for Mac. If I build the same container (from the same Dockerfile) in Docker on an Ubuntu box running amd64, it works fine.

<!-- gh-comment-id:361277634 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Monday Jan 15, 2018 at 14:24 GMT_ ---- OK, this is odd. It only seems to happen when running inside a container running on Docker for Mac. If I build the same container (from the same Dockerfile) in Docker on an Ubuntu box running amd64, it works fine.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tomtaylor
Monday Jan 15, 2018 at 14:27 GMT


If anyone wants to try and reproduce, I've put my Dockerfile and associated files over here: https://github.com/tomtaylor/multiroom-server

<!-- gh-comment-id:361277661 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tomtaylor"><img src="https://avatars2.githubusercontent.com/u/565?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tomtaylor](https://github.com/tomtaylor)** _Monday Jan 15, 2018 at 14:27 GMT_ ---- If anyone wants to try and reproduce, I've put my Dockerfile and associated files over here: https://github.com/tomtaylor/multiroom-server
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tenortim
Monday Jan 15, 2018 at 20:24 GMT


@tomtaylor this is running it on a Raspberry Pi 3. No containers but I am running the prebuilt version. Maybe I should try to build it all from scratch and see what I get. It still happens,

<!-- gh-comment-id:361277685 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tenortim"><img src="https://avatars3.githubusercontent.com/u/11024072?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tenortim](https://github.com/tenortim)** _Monday Jan 15, 2018 at 20:24 GMT_ ---- @tomtaylor this is running it on a Raspberry Pi 3. No containers but I am running the prebuilt version. Maybe I should try to build it all from scratch and see what I get. It still happens,
Author
Owner

@sashahilton00 commented on GitHub (Jan 31, 2018):

I'm fairly sure that this is a bug that librespot isn't responsible for - there is nothing in the backtrace to suggest librespot is the problem?

<!-- gh-comment-id:362067744 --> @sashahilton00 commented on GitHub (Jan 31, 2018): I'm fairly sure that this is a bug that librespot isn't responsible for - there is nothing in the backtrace to suggest librespot is the problem?
Author
Owner

@sashahilton00 commented on GitHub (Feb 1, 2018):

Does it run well outside a docker container @tomtaylor?

<!-- gh-comment-id:362117709 --> @sashahilton00 commented on GitHub (Feb 1, 2018): Does it run well outside a docker container @tomtaylor?
Author
Owner

@sashahilton00 commented on GitHub (Feb 7, 2018):

Closing as no response from OP, and no suggestion in backtrace that this is a bug in librespot. Open a new issue and reference this one if this is still a problem.

<!-- gh-comment-id:363788154 --> @sashahilton00 commented on GitHub (Feb 7, 2018): Closing as no response from OP, and no suggestion in backtrace that this is a bug in librespot. Open a new issue and reference this one if this is still a problem.
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#83
No description provided.