Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread 'main' panicked at 'connection closed' #262

Open
JoakimLindbom opened this issue Oct 24, 2017 · 11 comments
Open

Thread 'main' panicked at 'connection closed' #262

JoakimLindbom opened this issue Oct 24, 2017 · 11 comments

Comments

@JoakimLindbom
Copy link

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"
@tabell
Copy link

tabell commented Oct 27, 2017

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

@tenortim
Copy link

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.

@tenortim
Copy link

tenortim commented Nov 5, 2017

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

@tomtaylor
Copy link

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

@tomtaylor
Copy link

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

@kingosticks
Copy link

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

@tomtaylor
Copy link

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

@tomtaylor
Copy link

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.

@tomtaylor
Copy link

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.

@tomtaylor
Copy link

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

@tenortim
Copy link

@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,

dmeulen pushed a commit to dmeulen/librespot that referenced this issue May 16, 2019
Fix seek past EOF panic for some tracks
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

No branches or pull requests

5 participants