sfackler / rust-openssl

OpenSSL bindings for Rust
1.4k stars 750 forks source link

panicked at 'unexpected error ErrorSyscall' #224

Closed jwilm closed 9 years ago

jwilm commented 9 years ago

Hello! I've had the following panic a few times now. It's buried beneath some other dependencies, but since it's an internal panic, I figured this was the right place to post.

thread 'Chatbot Slack Receiver' panicked at 'unexpected error ErrorSyscall', /Users/jwilm/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.6.2/src/ssl/mod.rs:849
stack backtrace:
   1:        0x10cdcdeff - sys::backtrace::write::h7807ec07859fb503t1r
   2:        0x10cdd1774 - panicking::on_panic::ha0ed2b9b562a7f9ctZv
   3:        0x10cdc38a5 - rt::unwind::begin_unwind_inner::hbfb8d99cb52be7a1cHv
   4:        0x10cdc4136 - rt::unwind::begin_unwind_fmt::hac7eda7c3f3b8498QFv
   5:        0x10cbfeedf - ssl::SslStream<S>::in_retry_wrapper::h1304637325618911522
   6:        0x10cbfe54b - ssl::SslStream<S>.Read::read::h12291591541805341538
   7:        0x10cbfe4ae - stream::WebSocketStream.Read::read::h43e4fc69f48b88f9xGb
   8:        0x10cad2450 - buffer::BufReader<R>.BufRead::fill_buf::h2241210495052401946
   9:        0x10cad208d - buffer::BufReader<R>.Read::read::h5800319853316616795
  10:        0x10cad1d13 - new::read_full::h15063807489997256017
  11:        0x10cad1a4c - new::ReadBytesExt::read_u8::h3388885987129094012
  12:        0x10cad0a78 - ws::util::header::read_header::h2568954648368344267
  13:        0x10cad01ca - ws::util::dataframe::read_dataframe::h5104096244366572033
  14:        0x10cad0152 - client::receiver::Receiver<R>.ws..Receiver<DataFrame>::recv_dataframe::h15515566471358146519
  15:        0x10cacf71e - client::receiver::Receiver<R>.ws..Receiver<DataFrame>::recv_message_dataframes::h9691751597604189954
  16:        0x10cacf450 - ws::receiver::Receiver::recv_message::h6174258410197026233
  17:        0x10cacf3e7 - ws::receiver::MessageIterator<'a, R, D, M>.Iterator::next::h2995049338566379688
  18:        0x10cac1a8d - RtmClient::run::h11623016501603953850
  19:        0x10cac1269 - adapter::slack::SlackAdapter.ChatAdapter::process_events::closure.7914
  20:        0x10cac1084 - boxed::F.FnBox<A>::call_box::h5580165402778913587
  21:        0x10ca94c1b - boxed::Box<FnBox<A, Output $u3d$$u20$R$GT$$u2b$$u20$Send$u20$$u2b$$u20$$u27$a$GT$.FnOnce$LT$A$GT$::call_once::h2391079752540112018
  22:        0x10ca94102 - thread::Builder::spawn_inner::closure.6378
  23:        0x10ca9404e - rt::unwind::try::try_fn::__rust_abi::h12112194012502286846
  24:        0x10ca93fe9 - rt::unwind::try::try_fn::h12112194012502286846
  25:        0x10cdd32d8 - rust_try_inner
  26:        0x10cdd32c5 - rust_try
  27:        0x10ca934aa - rt::unwind::try::h3811103668140302305
  28:        0x10ca9309b - thread::Builder::spawn_inner::closure.6247
  29:        0x10ca94e3d - boxed::F.FnBox<A>::call_box::h5901552076168463494
  30:        0x10cdd026d - sys::thread::create::thread_start::ha3be9b31a8775143L4u
  31:     0x7fff90124267 - _pthread_body
  32:     0x7fff901241e4 - _pthread_start

Repro instructions using my project (sorry) and Slack (sorry again):

  1. Set up a slack account with a bot integration. You'll need to get the bot key and put it in the environment variable SLACK_BOT_TOKEN
  2. clone https://github.com/jwilm/chatbot
  3. run cd chatbot && cargo run -- --adapter slack
  4. Let it run for a bit and it will eventually panic
sfackler commented 9 years ago

I believe this change may fix the issue you were seeing. Could you try it out? It's released in v0.6.3. https://github.com/sfackler/rust-openssl/commit/c8d23f37a40afbb7ccb768241e429a51f94b8e7a

jwilm commented 9 years ago

@sfackler thanks for the update. The panic seems to be gone.