[GH-ISSUE #217] Thread main panicked at connection closed in option.rs #146

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

Originally created by @l3d00m on GitHub (May 10, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/217

This happened randomly in the middle of playback. This error happened twice in 10 minutes. It was reported in #94 too, but was closed after no response from OP.

Sorry for the ugly log, I'm running it with snapcast and they add some extra log tags unfortunately.

(Spotify) thread 'main' panicked at 'connection closed
(Spotify) ', libcore/option.rs:917:5
(Spotify) stack backtrace:
(Spotify) 0x9f305f - std::sys::unix::backtrace::
(Spotify) tracing::imp::unwind_backtrace::h4ef6490c84cef3d0
(Spotify) at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
(Spotify) 1:   0x9ecdbb - std::sys_common::backtrace::_print::hea150ee4f33bb5de
                       at libstd/sys_common/backtrace.rs:71
   2:   0x9f1acf - std::panicking::default_hook::{{closure
(Spotify) }}::h6c4396ff5bd61d89
                       at libstd/sys_common/backtrace.rs:59
                       at libstd/panicking.rs:380
   3:   0x9f16b3 - std::panicking::default_hook::h0f6cb16cf06a0198
                       at libstd/panicking.rs:396
   4:   0x9f1f73 - std::panicking::rust_panic_with_hook::h2207195920ffa55f
                       at libstd/panicking.rs:576
   5:   0x9f1dd7 - std::panicking::begin_panic::h8d43a09cf6d6e5f1
(Spotify) at libstd/panicking.rs:537
   6:   0x9f1d5b - std::panicking::begin_panic_fmt::hd9afc94159ee9735
                       at libstd/panicking.rs:521
   7:   0x9f1cf3 - rust_begin_unwind
                       at libstd/panicking.rs:497
   8:   0xa3fb57 - core::panicking::panic_fmt::h0bd854df201d1baf
(Spotify) at libcore/panicking.rs:71
(Spotify) 9:   0xa3fbc3 - core::option::expect_failed::hfa0c8a51e07f7adc
                       at libcore/option.rs:917
  10:   0x60eb5f - <librespot_core::session::DispatchTask<
(Spotify) S> as futures::future::Future>::poll::h6728e700ec84c7e3
  11:   0x67da73 - <futures::future::join::Join<A, B> as futures::future::Future>::poll::hb1cd27ed6e85919d
  12:   0x6a73e7 - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h43e3b67709f87b17
  13:   0x6ba6cf - <futures::future::map_err::MapErr
(Spotify) <A, F> as futures::future::Future>::poll::ha1fbf3ed95b344bb
  14:   0x91e767 - futures::task_impl::std::set::hfd407edb81c5318d
  15:   0x92091f - <futures::task_impl::Spawn<T>>::poll_future_notify::h49de0bd46fc4494f
(Spotify) 16:   0x
(Spotify) 9111bf - tokio::executor::current_thread::CurrentRunner::set_spawn::he31ea0e879c4fd22
  17:   0x915e27 - <tokio::executor::current_thread::scheduler::Scheduler<U>>::tick::hd56a579622bef790
(Spotify) :   0x916cb7 - <scoped_tls
(Spotify) ::ScopedKey<T>>::set::hc08aada2e2bd75ef
  19:   0x917c97 - <std::thread::local::LocalKey<T>>::with::h076845e1007c7840
  20:   0x917713 - <
(Spotify) std::thread::local::LocalKey<T>>::with::h059cb23d1775aca8
  21:   0x918277 - <std::thread::local::LocalKey<T>>::with::h8659ed5208b6f330
  22:   0x911d3f - tokio_core::reactor::Core::poll::ha66fedf5527ada92
  23:   0x50aa73 - tokio_core::reactor::Core::run::hda0ba19f949a8f18
  24:   0x52e8c7 - librespot::main::hd05bb25f4d0dd18c
  25:   0x521bf3 - std::
(Spotify) rt::lang_start::{{closure}}::ha9c718613290118d
  26:   0x9f1c2b - std::panicking::try::do_call::h5f03c49f73b7300e
                       at libstd/rt.rs:59
                       at libstd/panicking.rs:479
  27:   0xa01373 - __rust_maybe_catch_panic
(Spotify) at libpanic_unwind/lib.rs
(Spotify) :102
  28:   0x9f239b - std::rt::lang_start_internal::h907d77b40aa767dd
(Spotify) at libstd/panicking.rs:458
                       at libstd/panic.rs:358
                       at libstd/rt.rs:58
  29:   0x52f4bf - main
  30: 0x76d80677 - __libc_start_main
Originally created by @l3d00m on GitHub (May 10, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/217 This happened randomly in the middle of playback. This error happened twice in 10 minutes. It was reported in #94 too, but was closed after no response from OP. Sorry for the ugly log, I'm running it with snapcast and they add some extra log tags unfortunately. ``` (Spotify) thread 'main' panicked at 'connection closed (Spotify) ', libcore/option.rs:917:5 (Spotify) stack backtrace: (Spotify) 0x9f305f - std::sys::unix::backtrace:: (Spotify) tracing::imp::unwind_backtrace::h4ef6490c84cef3d0 (Spotify) at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 (Spotify) 1: 0x9ecdbb - std::sys_common::backtrace::_print::hea150ee4f33bb5de at libstd/sys_common/backtrace.rs:71 2: 0x9f1acf - std::panicking::default_hook::{{closure (Spotify) }}::h6c4396ff5bd61d89 at libstd/sys_common/backtrace.rs:59 at libstd/panicking.rs:380 3: 0x9f16b3 - std::panicking::default_hook::h0f6cb16cf06a0198 at libstd/panicking.rs:396 4: 0x9f1f73 - std::panicking::rust_panic_with_hook::h2207195920ffa55f at libstd/panicking.rs:576 5: 0x9f1dd7 - std::panicking::begin_panic::h8d43a09cf6d6e5f1 (Spotify) at libstd/panicking.rs:537 6: 0x9f1d5b - std::panicking::begin_panic_fmt::hd9afc94159ee9735 at libstd/panicking.rs:521 7: 0x9f1cf3 - rust_begin_unwind at libstd/panicking.rs:497 8: 0xa3fb57 - core::panicking::panic_fmt::h0bd854df201d1baf (Spotify) at libcore/panicking.rs:71 (Spotify) 9: 0xa3fbc3 - core::option::expect_failed::hfa0c8a51e07f7adc at libcore/option.rs:917 10: 0x60eb5f - <librespot_core::session::DispatchTask< (Spotify) S> as futures::future::Future>::poll::h6728e700ec84c7e3 11: 0x67da73 - <futures::future::join::Join<A, B> as futures::future::Future>::poll::hb1cd27ed6e85919d 12: 0x6a73e7 - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h43e3b67709f87b17 13: 0x6ba6cf - <futures::future::map_err::MapErr (Spotify) <A, F> as futures::future::Future>::poll::ha1fbf3ed95b344bb 14: 0x91e767 - futures::task_impl::std::set::hfd407edb81c5318d 15: 0x92091f - <futures::task_impl::Spawn<T>>::poll_future_notify::h49de0bd46fc4494f (Spotify) 16: 0x (Spotify) 9111bf - tokio::executor::current_thread::CurrentRunner::set_spawn::he31ea0e879c4fd22 17: 0x915e27 - <tokio::executor::current_thread::scheduler::Scheduler<U>>::tick::hd56a579622bef790 (Spotify) : 0x916cb7 - <scoped_tls (Spotify) ::ScopedKey<T>>::set::hc08aada2e2bd75ef 19: 0x917c97 - <std::thread::local::LocalKey<T>>::with::h076845e1007c7840 20: 0x917713 - < (Spotify) std::thread::local::LocalKey<T>>::with::h059cb23d1775aca8 21: 0x918277 - <std::thread::local::LocalKey<T>>::with::h8659ed5208b6f330 22: 0x911d3f - tokio_core::reactor::Core::poll::ha66fedf5527ada92 23: 0x50aa73 - tokio_core::reactor::Core::run::hda0ba19f949a8f18 24: 0x52e8c7 - librespot::main::hd05bb25f4d0dd18c 25: 0x521bf3 - std:: (Spotify) rt::lang_start::{{closure}}::ha9c718613290118d 26: 0x9f1c2b - std::panicking::try::do_call::h5f03c49f73b7300e at libstd/rt.rs:59 at libstd/panicking.rs:479 27: 0xa01373 - __rust_maybe_catch_panic (Spotify) at libpanic_unwind/lib.rs (Spotify) :102 28: 0x9f239b - std::rt::lang_start_internal::h907d77b40aa767dd (Spotify) at libstd/panicking.rs:458 at libstd/panic.rs:358 at libstd/rt.rs:58 29: 0x52f4bf - main 30: 0x76d80677 - __libc_start_main ```
kerem closed this issue 2026-02-27 19:29:05 +03:00
Author
Owner

@ComlOnline commented on GitHub (Jun 4, 2018):

@l3d00m Are you still having this issue?

<!-- gh-comment-id:394455593 --> @ComlOnline commented on GitHub (Jun 4, 2018): @l3d00m Are you still having this issue?
Author
Owner

@l3d00m commented on GitHub (Jun 5, 2018):

No this one was a one-shot so far

<!-- gh-comment-id:394618860 --> @l3d00m commented on GitHub (Jun 5, 2018): No this one was a one-shot so far
Author
Owner

@1337sup3rh4x0r commented on GitHub (Aug 10, 2018):

I just had a similar panick at "connection closed", also running librespot via snapcast.
Librespot was compiled from sources recently (2018.08.07) and is running on a FreeBSD 11 system.

I checked my Internet connection log, there was no dropout.

Maybe we can reopen this issue?

#94 and #215 seem to be related, as the logs also show a panick at "connection closed".

2018-08-10 10-48-53 [Info] (Spotify) INFO:librespot_playback::player: Loading track "Extermination Order" with Spotify URI "spotify:track:5jdQyBYrTdSHGQA6AdwjXZ"
2018-08-10 10-48-54 [Info] (Spotify) INFO:librespot_playback::player: Track "Extermination Order" loaded
2018-08-10 10-48-54 [Info] metadata: <Extermination Order>
2018-08-10 10-48-54 [Info] metadata={
2018-08-10 10-48-54 [Info]     "STREAM": "Spotify",
2018-08-10 10-48-54 [Info]     "TITLE": "Extermination Order"
2018-08-10 10-48-54 [Info] }
2018-08-10 10-48-54 [Info] onMetaChanged (Spotify)
2018-08-10 10-48-56 [Info] onResync (Spotify): 1.2665e+06ms
2018-08-10 10-48-56 [Info] onResync (Spotify): 151ms
2018-08-10 10-48-56 [Info] onStateChanged (Spotify): 2
2018-08-10 10-51-11 [Info] (Spotify) thread 'main' panicked at 'connection closed', src/libcore/option.rs:891:5
2018-08-10 10-51-11 [Info] (Spotify) stack backtrace:
2018-08-10 10-51-11 [Info] (Spotify) 0:          0x151676b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h8a68556765699628
2018-08-10 10-51-11 [Info]    1:
2018-08-10 10-51-11 [Info] (Spotify) 0x151d5be - std::sys_common::backtrace::print::hd9cd2cd1216dc9cb
2018-08-10 10-51-11 [Info]    2:          0x1515f40 - std::panicking::default_hook::{{closure}}::h1c4745b6dc9ac2fd
2018-08-10 10-51-11 [Info]    3:          0x1515c81 - std::panicking::default_hook::h343503bbea399679
2018-08-10 10-51-11 [Info]    4:          0x1516377 - std::panicking::rust_panic_with_hook::hcf6685586ca984c2
2018-08-10 10-51-11 [Info] (Spotify) 5:          0x15161ce - std::panicking::begin_panic::h1cc35849ea44407b
2018-08-10 10-51-11 [Info]    6:          0x151613a - std::panicking::begin_panic_fmt::hf9347143b9897b85
2018-08-10 10-51-11 [Info]    7:          0x15160d2 - rust_begin_unwind
2018-08-10 10-51-11 [Info]    8:          0x15687f0 - core::panicking::panic_fmt::hb9c0f300e4a5aca2
2018-08-10 10-51-11 [Info]    9:          0x1568f08 - core::option::expect_failed::h4b9142928d615bda
2018-08-10 10-51-11 [Info]   10:          0x12111af - <librespot_core::
2018-08-10 10-51-11 [Info] (Spotify) session::DispatchTask<S> as futures::future::Future>::poll::hbb0099a5572f59d2
2018-08-10 10-51-11 [Info]   11:          0x11e02a5 - <futures::future::join::Join<A, B> as futures::future::Future>::poll::he1bbfbb34a2b9e00
2018-08-10 10-51-11 [Info]   12:          0x1233449 - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h3f5b8ae377757ad3
2018-08-10 10-51-11 [Info]   13:          0x120016e - <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll::h7e7a1fd0156b28e0
2018-08-10 10-51-11 [Info]   14:          0x14d4a3c - futures::task_impl::std::set::hd48cd5564b35508d
2018-08-10 10-51-11 [Info]   15:          0x14d4c9e
2018-08-10 10-51-11 [Info] (Spotify) - <futures::task_impl::Spawn<T>>::poll_future_notify::hff18fbb8edc24f2d
2018-08-10 10-51-11 [Info]   16:          0x14d3623 - tokio::executor::current_thread::CurrentRunner::set_spawn::h7e5321b650c52ba1
2018-08-10 10-51-11 [Info]   17:          0x14cf6d3 - <tokio::executor::current_thread::scheduler::Scheduler<U>>::tick::h87bb812e17c29db6
2018-08-10 10-51-11 [Info]   18:          0x14d521a - <scoped_tls::ScopedKey<T>>::set::hf1aa0b1b178f9a5d
2018-08-10 10-51-11 [Info]   19:          0x14d3dc6 - <std::thread::local::LocalKey<T>>::with::h298333b3d1ff1a26
2018-08-10 10-51-11 [Info]   20:          0x14d4305 - <std::thread::local::LocalKey<T>>::with::h5e408d6536072808
2018-08-10 10-51-11 [Info]   21:          0x14d3a38 - <std::thread::local::LocalKey<T>>::with::h00e0d54120a84300
2018-08-10 10-51-11 [Info]   22:          0x14d03ad - tokio_core::reactor::Core
2018-08-10 10-51-11 [Info] (Spotify) ::poll::h0616c76a5b684f03
2018-08-10 10-51-11 [Info]   23:          0x10a6462 - tokio_core::reactor::Core::run::hc06fcfa374aeaabd
2018-08-10 10-51-11 [Info]   24:          0x10be9da - librespot::main::h728df9bb283def3d
2018-08-10 10-51-11 [Info]   25:          0x10a7605 - std::rt::lang_start::{{closure}}::hcb91eb1e5e820223
2018-08-10 10-51-11 [Info]   26:          0x1516047 - std::panicking::try::do_call::hde3e6eab4ea20b2a
2018-08-10 10-51-11 [Info]   27:          0x1535cfe - __rust_maybe_catch_panic
2018-08-10 10-51-11 [Info]                                at src/libpanic_unwind/lib.rs:101
2018-08-10 10-51-11 [Info]   28:          0x1516557 - std::rt::lang_start_internal::hf081483bf15700db
2018-08-10 10-51-11 [Info]   29:
2018-08-10 10-51-11 [Info] (Spotify) 0x10bed1b - main
2018-08-10 10-51-11 [Info]   30:          0x10a0be0 - _start
2018-08-10 10-51-11 [Info]   31:        0x8019defff - <unknown>
2018-08-10 10-51-11 [Err] (PipeStream) Exception: end of file
2018-08-10 10-51-41 [Info] (Spotify) INFO:librespot: librespot ee87904 (2018-08-06). Built on 2018-08-07. Build ID: KT5gmcqC
2018-08-10 10-51-41 [Info] (Spotify) WARN:mdns::fsm: error sending packet Error { repr: Os { code: 51, message: "Network is unreachable" } }
2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-wtnv.ap.spotify.com:4070"
2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Authenticated as "xXxX" !
2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Country: "xX"
2018-08-10 10-51-43 [Info] onStateChanged (Spotify): 1
<!-- gh-comment-id:412023968 --> @1337sup3rh4x0r commented on GitHub (Aug 10, 2018): I just had a similar panick at "connection closed", also running librespot via snapcast. Librespot was compiled from sources recently (2018.08.07) and is running on a FreeBSD 11 system. I checked my Internet connection log, there was no dropout. Maybe we can reopen this issue? #94 and #215 seem to be related, as the logs also show a panick at "connection closed". 2018-08-10 10-48-53 [Info] (Spotify) INFO:librespot_playback::player: Loading track "Extermination Order" with Spotify URI "spotify:track:5jdQyBYrTdSHGQA6AdwjXZ" 2018-08-10 10-48-54 [Info] (Spotify) INFO:librespot_playback::player: Track "Extermination Order" loaded 2018-08-10 10-48-54 [Info] metadata: <Extermination Order> 2018-08-10 10-48-54 [Info] metadata={ 2018-08-10 10-48-54 [Info] "STREAM": "Spotify", 2018-08-10 10-48-54 [Info] "TITLE": "Extermination Order" 2018-08-10 10-48-54 [Info] } 2018-08-10 10-48-54 [Info] onMetaChanged (Spotify) 2018-08-10 10-48-56 [Info] onResync (Spotify): 1.2665e+06ms 2018-08-10 10-48-56 [Info] onResync (Spotify): 151ms 2018-08-10 10-48-56 [Info] onStateChanged (Spotify): 2 2018-08-10 10-51-11 [Info] (Spotify) thread 'main' panicked at 'connection closed', src/libcore/option.rs:891:5 2018-08-10 10-51-11 [Info] (Spotify) stack backtrace: 2018-08-10 10-51-11 [Info] (Spotify) 0: 0x151676b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h8a68556765699628 2018-08-10 10-51-11 [Info] 1: 2018-08-10 10-51-11 [Info] (Spotify) 0x151d5be - std::sys_common::backtrace::print::hd9cd2cd1216dc9cb 2018-08-10 10-51-11 [Info] 2: 0x1515f40 - std::panicking::default_hook::{{closure}}::h1c4745b6dc9ac2fd 2018-08-10 10-51-11 [Info] 3: 0x1515c81 - std::panicking::default_hook::h343503bbea399679 2018-08-10 10-51-11 [Info] 4: 0x1516377 - std::panicking::rust_panic_with_hook::hcf6685586ca984c2 2018-08-10 10-51-11 [Info] (Spotify) 5: 0x15161ce - std::panicking::begin_panic::h1cc35849ea44407b 2018-08-10 10-51-11 [Info] 6: 0x151613a - std::panicking::begin_panic_fmt::hf9347143b9897b85 2018-08-10 10-51-11 [Info] 7: 0x15160d2 - rust_begin_unwind 2018-08-10 10-51-11 [Info] 8: 0x15687f0 - core::panicking::panic_fmt::hb9c0f300e4a5aca2 2018-08-10 10-51-11 [Info] 9: 0x1568f08 - core::option::expect_failed::h4b9142928d615bda 2018-08-10 10-51-11 [Info] 10: 0x12111af - <librespot_core:: 2018-08-10 10-51-11 [Info] (Spotify) session::DispatchTask<S> as futures::future::Future>::poll::hbb0099a5572f59d2 2018-08-10 10-51-11 [Info] 11: 0x11e02a5 - <futures::future::join::Join<A, B> as futures::future::Future>::poll::he1bbfbb34a2b9e00 2018-08-10 10-51-11 [Info] 12: 0x1233449 - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h3f5b8ae377757ad3 2018-08-10 10-51-11 [Info] 13: 0x120016e - <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll::h7e7a1fd0156b28e0 2018-08-10 10-51-11 [Info] 14: 0x14d4a3c - futures::task_impl::std::set::hd48cd5564b35508d 2018-08-10 10-51-11 [Info] 15: 0x14d4c9e 2018-08-10 10-51-11 [Info] (Spotify) - <futures::task_impl::Spawn<T>>::poll_future_notify::hff18fbb8edc24f2d 2018-08-10 10-51-11 [Info] 16: 0x14d3623 - tokio::executor::current_thread::CurrentRunner::set_spawn::h7e5321b650c52ba1 2018-08-10 10-51-11 [Info] 17: 0x14cf6d3 - <tokio::executor::current_thread::scheduler::Scheduler<U>>::tick::h87bb812e17c29db6 2018-08-10 10-51-11 [Info] 18: 0x14d521a - <scoped_tls::ScopedKey<T>>::set::hf1aa0b1b178f9a5d 2018-08-10 10-51-11 [Info] 19: 0x14d3dc6 - <std::thread::local::LocalKey<T>>::with::h298333b3d1ff1a26 2018-08-10 10-51-11 [Info] 20: 0x14d4305 - <std::thread::local::LocalKey<T>>::with::h5e408d6536072808 2018-08-10 10-51-11 [Info] 21: 0x14d3a38 - <std::thread::local::LocalKey<T>>::with::h00e0d54120a84300 2018-08-10 10-51-11 [Info] 22: 0x14d03ad - tokio_core::reactor::Core 2018-08-10 10-51-11 [Info] (Spotify) ::poll::h0616c76a5b684f03 2018-08-10 10-51-11 [Info] 23: 0x10a6462 - tokio_core::reactor::Core::run::hc06fcfa374aeaabd 2018-08-10 10-51-11 [Info] 24: 0x10be9da - librespot::main::h728df9bb283def3d 2018-08-10 10-51-11 [Info] 25: 0x10a7605 - std::rt::lang_start::{{closure}}::hcb91eb1e5e820223 2018-08-10 10-51-11 [Info] 26: 0x1516047 - std::panicking::try::do_call::hde3e6eab4ea20b2a 2018-08-10 10-51-11 [Info] 27: 0x1535cfe - __rust_maybe_catch_panic 2018-08-10 10-51-11 [Info] at src/libpanic_unwind/lib.rs:101 2018-08-10 10-51-11 [Info] 28: 0x1516557 - std::rt::lang_start_internal::hf081483bf15700db 2018-08-10 10-51-11 [Info] 29: 2018-08-10 10-51-11 [Info] (Spotify) 0x10bed1b - main 2018-08-10 10-51-11 [Info] 30: 0x10a0be0 - _start 2018-08-10 10-51-11 [Info] 31: 0x8019defff - <unknown> 2018-08-10 10-51-11 [Err] (PipeStream) Exception: end of file 2018-08-10 10-51-41 [Info] (Spotify) INFO:librespot: librespot ee87904 (2018-08-06). Built on 2018-08-07. Build ID: KT5gmcqC 2018-08-10 10-51-41 [Info] (Spotify) WARN:mdns::fsm: error sending packet Error { repr: Os { code: 51, message: "Network is unreachable" } } 2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-wtnv.ap.spotify.com:4070" 2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Authenticated as "xXxX" ! 2018-08-10 10-51-42 [Info] (Spotify) INFO:librespot_core::session: Country: "xX" 2018-08-10 10-51-43 [Info] onStateChanged (Spotify): 1
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#146
No description provided.