near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.32k stars 622 forks source link

RPC crash on processing request #1535

Closed ilblackdragon closed 4 years ago

ilblackdragon commented 5 years ago
thread 'actix-rt:worker:7' panicked at 'internal error: entered unreachable code', chain/jsonrpc/src/lib.rs:201:18
stack backtrace:
   0:     0x562978130413 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h8f3e269988de8149
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x56297812e8b1 - std::panicking::default_hook::{{closure}}::h7d4a222b68bf0690
                               at src/libstd/sys_common/backtrace.rs:71
                               at src/libstd/sys_common/backtrace.rs:59
                               at src/libstd/panicking.rs:197
   2:     0x56297812d714 - std::panicking::rust_panic_with_hook::h2796b955a37c6939
                               at src/libstd/panicking.rs:211
                               at src/libstd/panicking.rs:474
   3:     0x5629779cf913 - std::panicking::begin_panic::hd713ff4c7eaa322d
   4:     0x562977a4a707 - near_jsonrpc::JsonRpcHandler::process_request::{{closure}}::h87fdf3c71d72e22b
   5:     0x562977a42190 - <std::future::GenFuture<T> as core::future::future::Future>::poll::h8899a5399a38b0c1
   6:     0x562977a23e88 - <actix_web::handler::AsyncHandlerServiceResponse<T> as futures::future::Future>::poll::h5bcb896b1c32ee39
   7:     0x562977a40394 - <actix_web::handler::ExtractResponse<T,S> as futures::future::Future>::poll::hc28600737d0029de
   8:     0x562977a4128a - <futures::future::then::Then<A,B,F> as futures::future::Future>::poll::hd89ee0901b825c0a
   9:     0x562977a3cbee - <futures::future::either::Either<A,B> as futures::future::Future>::poll::hf2d9ae4bd393ee11
  10:     0x562977a02394 - <actix_web::middleware::logger::LoggerResponse<S,B> as futures::future::Future>::poll::hb1d340f293ba27dc
  11:     0x562977a1d8de - actix_http::h1::dispatcher::InnerDispatcher<T,S,B,X,U>::poll_response::hc6fe4ce8f4edbaca
  12:     0x5629779e2160 - <actix_http::h1::dispatcher::Dispatcher<T,S,B,X,U> as futures::future::Future>::poll::h2b8913b3a8d7d56b
  13:     0x5629779dffec - <actix_http::service::HttpServiceHandlerResponse<T,S,B,X,U> as futures::future::Future>::poll::hd3986222d36b8ddc
  14:     0x5629779dec5f - <futures::future::then::Then<A,B,F> as futures::future::Future>::poll::h7e6e46b4abb33071
  15:     0x56297810389f - actix_rt::runtime::Runtime::block_on::h9372794f3742ffb3
  16:     0x562978100c2d - std::sys_common::backtrace::__rust_begin_short_backtrace::h3712c8cafd0734ca
  17:     0x562978100491 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hc5e6d944041bdd97
  18:     0x56297813e8ce - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h600fbe964d0999a1
                               at /rustc/50a0defd5a93523067ef239936cc2e0755220904/src/liballoc/boxed.rs:704
  19:     0x562978140b8b - std::sys::unix::thread::Thread::new::thread_start::h2f7b47454baee1aa
                               at /rustc/50a0defd5a93523067ef239936cc2e0755220904/src/liballoc/boxed.rs:704
                               at src/libstd/sys_common/thread.rs:13
                               at src/libstd/sys/unix/thread.rs:79
  20:     0x7f76b56206da - start_thread
  21:     0x7f76b513188e - __clone
  22:                0x0 - <unknown>
Panic in Arbiter thread, shutting down system.
[2019-10-23T07:19:41Z ERROR actix_server::builder] Worker has died 4, restarting
ailisp commented 4 years ago

This is likely to fixed by @bowenwang1996 in #1544. It was missing one case NoResponse (when msg forwarded). From reading i cannot see a path generating things besides ValidTx InvalidTx and NoResponse. In case this happens in the future, i suggest adding a log before unreachable so we can see what kind of message it is