Skip to content

Client panics with 'handler not in queue for key' #848

Closed
@arkpar

Description

@arkpar

Using latest master. I have a Client that sends HTTP POST requests to the same URL from multiple threads and sometime this happens:

2016-06-29 19:39:49 TRACE:hyper::client: on_incoming MessageHead { version: Http11, subject: RawStatus(200, "OK"), headers: Headers { Date: Wed, 29 Jun 2016 17:39:49 GMT, Content-Type: text/html; charset=utf-8, Transfer-Encoding: chunked, Connection: keep-alive, Set-Cookie: __cfduid=d7fc357ba132c654f5d1ff011ddf8f45c1467221989; expires=Thu, 29-Jun-17 17:39:49 GMT; path=/; domain=.requestb.in; HttpOnly, Sponsored-By: https://www.runscope.com, Via: 1.1 vegur, Server: cloudflare-nginx, CF-RAY: 2bab28f85afc2696-FRA, } }
2016-06-29 19:39:49 TRACE:hyper::client::response: Response::new
2016-06-29 19:39:49 DEBUG:hyper::client::response: version=Http11, status=Ok
2016-06-29 19:39:49 DEBUG:hyper::client::response: headers=Headers { Date: Wed, 29 Jun 2016 17:39:49 GMT, Content-Type: text/html; charset=utf-8, Transfer-Encoding: chunked, Connection: keep-alive, Set-Cookie: __cfduid=d7fc357ba132c654f5d1ff011ddf8f45c1467221989; expires=Thu, 29-Jun-17 17:39:49 GMT; path=/; domain=.requestb.in; HttpOnly, Sponsored-By: https://www.runscope.com, Via: 1.1 vegur, Server: cloudflare-nginx, CF-RAY: 2bab28f85afc2696-FRA, }
2016-06-29 19:39:49 TRACE:hyper::http::conn: handler.on_incoming() -> Next::End
2016-06-29 19:39:49 TRACE:hyper::http::conn: Conn.on_readable State::Http1 completed, new state = Closed
2016-06-29 19:39:49 TRACE:hyper::http::conn: on_readable <- Closed
2016-06-29 19:39:49 TRACE:hyper::http::conn: removing transport
2016-06-29 19:39:49 DEBUG:hyper::http::conn: on_remove
2016-06-29 19:39:49 TRACE:hyper::http::conn: Conn::ready events='Writable', blocked=None
2016-06-29 19:39:49 TRACE:hyper::http::conn: on_writable -> Init
thread 'hyper-client' panicked at 'handler not in queue for key', ../src/libcore/option.rs:700
stack backtrace:
   1:        0x10df189a8 - std::sys::backtrace::tracing::imp::write::h4c73fcd3363076f5
   2:        0x10df1d695 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h0422dbb3077e6747
   3:        0x10df1d2ce - std::panicking::default_hook::haac48fa641db8fa2
   4:        0x10df042a6 - std::sys_common::unwind::begin_unwind_inner::h39d40f52add53ef7
   5:        0x10df0512e - std::sys_common::unwind::begin_unwind_fmt::h64c0ff793199cc1b
   6:        0x10df17c77 - rust_begin_unwind
   7:        0x10df44650 - core::panicking::panic_fmt::h73bf9d7e8e891a73
   8:        0x10df4ba05 - core::option::expect_failed::h076bf2c39f982c10
   9:        0x10d15bff7 - _<std..option..Option<T>>::expect::h4d371225682cdf33
  10:        0x10d15bde8 - _<hyper..client..Context<K, H>>::pop_queue::h9f1ca6f87b02e137
  11:        0x10d17f2c8 - _<hyper..client..Context<K, H> as hyper..http..conn..MessageHandlerFactory<K, T>>::create::h72fe55a18cf094e1
  12:        0x10d1838d1 - _<hyper..http..conn..ConnInner<K, T, H>>::write::h27233c439f264973
  13:        0x10d1833e7 - _<hyper..http..conn..ConnInner<K, T, H>>::on_writable::hf0fc8b494309b678
  14:        0x10d16a117 - _<hyper..http..conn..Conn<K, T, H>>::ready::hcd9a5057a4a978bb
  15:        0x10d168d34 - _<hyper..client..ClientFsm<C, H> as rotor..machine..Machine>::ready::h18d7b4b8c2b1d861
  16:        0x10d156a2a - _<rotor..handler..Handler<M> as mio..handler..Handler>::ready::_$u7b$$u7b$closure$u7d$$u7d$::hd97c848ac2d5a15f
  17:        0x10d154829 - rotor::handler::machine_loop::_$u7b$$u7b$closure$u7d$$u7d$::hc30baa823bb27586
  18:        0x10d153bdf - _<slab..Slab<T, I>>::replace_with::h33450c53ecf92861
  19:        0x10d153373 - rotor::handler::machine_loop::h9cb7d33db670d5d7
  20:        0x10d153267 - _<rotor..handler..Handler<M> as mio..handler..Handler>::ready::h710fa45b2de72561
  21:        0x10d15320f - _<mio..event_loop..EventLoop<H>>::io_event::h03b152c8f8e13717
  22:        0x10d153138 - _<mio..event_loop..EventLoop<H>>::io_process::h181871cbb835ee55
  23:        0x10d152720 - _<mio..event_loop..EventLoop<H>>::run_once::h3d9fc897d97966a0
  24:        0x10d151f6b - _<mio..event_loop..EventLoop<H>>::run::hb65bd25c79b9dbbf
  25:        0x10d151e87 - _<rotor..creator..LoopInstance<M>>::run::he20d485afc7f963f
  26:        0x10d151da8 - _<rotor..creator..LoopCreator<M>>::run::h0cc8a75bbdd8303c
  27:        0x10d151819 - _<hyper..Client<H>>::configured::_$u7b$$u7b$closure$u7d$$u7d$::h8f30494177b18b6d
  28:        0x10d1511d3 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h4b89e9fded2ad991
  29:        0x10d151148 - std::sys_common::unwind::try::try_fn::h4a08d65f9221d375
  30:        0x10df17c0b - __rust_try
  31:        0x10df17b93 - std::sys_common::unwind::inner_try::h9eebd8dc83f388a6
  32:        0x10d151085 - std::sys_common::unwind::try::h3a06944618b15d43
  33:        0x10d150eb1 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hcec021c16765064b
  34:        0x10d151a57 - _<F as std..boxed..FnBox<A>>::call_box::h861041a9a27a885d
  35:        0x10df1c828 - std::sys::thread::Thread::new::thread_start::h471ad90789353b5b
  36:     0x7fff9549f99c - _pthread_body
  37:     0x7fff9549f919 - _pthread_start

OS X 10.11.5

Metadata

Metadata

Assignees

Labels

A-clientArea: client.C-bugCategory: bug. Something is wrong. This is bad!

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions