Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Node crashes on state_getStorage when invalid size hash is passed in the params #3838

Closed
alexeuler opened this issue Oct 17, 2019 · 4 comments
Assignees

Comments

@alexeuler
Copy link
Contributor

Reproduction:

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "state_getStorage", "params": ["0x7f864e18e3dd8b58386310d2fe0919eef27c6e558564b7f67f22d99d20f587b"]}' http://localhost:9933/

Which causes:

stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.38/src/backtrace/libunwind.rs:88
      backtrace::backtrace::trace_unsynchronized
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.38/src/backtrace/mod.rs:66
   1: backtrace::backtrace::trace
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.38/src/backtrace/mod.rs:53
   2: backtrace::capture::Backtrace::create
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.38/src/capture.rs:164
   3: backtrace::capture::Backtrace::new
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.38/src/capture.rs:128
   4: substrate_panic_handler::panic_hook
             at core/panic-handler/src/lib.rs:148
   5: substrate_panic_handler::set::{{closure}}
             at core/panic-handler/src/lib.rs:58
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: rust_begin_unwind
             at src/libstd/panicking.rs:311
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:61
  11: <usize as core::slice::SliceIndex<[T]>>::index_mut
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:2687
  12: core::slice::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:2548
  13: <alloc::vec::Vec<T> as core::ops::index::IndexMut<I>>::index_mut
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1768
  14: <impl_serde::serialize::deserialize::Visitor as serde::de::Visitor>::visit_str
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/impl-serde-0.2.1/src/serialize.rs:131
  15: <impl_serde::serialize::deserialize::Visitor as serde::de::Visitor>::visit_string
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/impl-serde-0.2.1/src/serialize.rs:140
  16: serde_json::value::de::<impl serde::de::Deserializer for serde_json::value::Value>::deserialize_string
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:348
  17: serde_json::value::de::<impl serde::de::Deserializer for serde_json::value::Value>::deserialize_str
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:340
  18: impl_serde::serialize::deserialize
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/impl-serde-0.2.1/src/serialize.rs:144
  19: <substrate_primitives_storage::_IMPL_DESERIALIZE_FOR_StorageKey::<impl serde::de::Deserialize for substrate_primitives_storage::StorageKey>::deserialize::__Visitor as serde::de::Visitor>::visit_newtype_struct
             at core/primitives/storage/src/lib.rs:28
  20: serde_json::value::de::<impl serde::de::Deserializer for serde_json::value::Value>::deserialize_newtype_struct
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:316
  21: substrate_primitives_storage::_IMPL_DESERIALIZE_FOR_StorageKey::<impl serde::de::Deserialize for substrate_primitives_storage::StorageKey>::deserialize
             at core/primitives/storage/src/lib.rs:28
  22: <core::marker::PhantomData<T> as serde::de::DeserializeSeed>::deserialize
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/src/de/mod.rs:786
  23: <serde_json::value::de::SeqDeserializer as serde::de::SeqAccess>::next_element_seed
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:604
  24: serde::de::SeqAccess::next_element
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/src/de/mod.rs:1708
  25: <&mut A as serde::de::SeqAccess>::next_element
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/src/de/mod.rs:1737
  26: <serde::de::impls::<impl serde::de::Deserialize for (T0,)>::deserialize::TupleVisitor<T0> as serde::de::Visitor>::visit_seq
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/src/de/impls.rs:1111
  27: serde_json::value::de::visit_array
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:176
  28: serde_json::value::de::<impl serde::de::Deserializer for serde_json::value::Value>::deserialize_seq
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:397
  29: serde_json::value::de::<impl serde::de::Deserializer for serde_json::value::Value>::deserialize_tuple
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/de.rs:406
  30: serde::de::impls::<impl serde::de::Deserialize for (T0,)>::deserialize
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/src/de/impls.rs:1121
  31: serde_json::value::from_value
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.41/src/value/mod.rs:1007
  32: jsonrpc_core::types::params::Params::parse
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-core-13.2.0/src/types/params.rs:29
  33: substrate_rpc_api::state::rpc_impl_StateApi::gen_server::StateApi::to_delegate::{{closure}}::{{closure}}
             at core/rpc/api/src/state/mod.rs:33
  34: core::result::Result<T,E>::and_then
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/result.rs:639
  35: substrate_rpc_api::state::rpc_impl_StateApi::gen_server::StateApi::to_delegate::{{closure}}
             at core/rpc/api/src/state/mod.rs:33
  36: <jsonrpc_core::delegates::DelegateAsyncMethod<T,F> as jsonrpc_core::calls::RpcMethod<M>>::call
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-core-13.2.0/src/delegates.rs:27
  37: jsonrpc_core::io::MetaIoHandler<T,S>::handle_call::{{closure}}::{{closure}}::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-core-13.2.0/src/io.rs:261
  38: futures::future::lazy::Lazy<F,R>::get
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/lazy.rs:64
  39: <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/lazy.rs:82
  40: futures::future::chain::Chain<A,B,C>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/chain.rs:26
  41: <futures::future::then::Then<A,B,F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/then.rs:32
  42: <alloc::boxed::Box<F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/mod.rs:113
  43: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:35
  44: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:36
  45: <futures::future::map::Map<A,F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/map.rs:30
  46: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:35
  47: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:36
  48: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:36
  49: <futures::future::map::Map<A,F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/map.rs:30
  50: <jsonrpc_http_server::handler::RpcHandler<M,S> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-http-server-13.2.0/src/handler.rs:279
  51: <jsonrpc_http_server::handler::RpcHandler<M,S> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-http-server-13.2.0/src/handler.rs:317
  52: <jsonrpc_http_server::handler::RpcHandler<M,S> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-http-server-13.2.0/src/handler.rs:317
  53: <jsonrpc_http_server::handler::Handler<M,S> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpc-http-server-13.2.0/src/handler.rs:126
  54: <hyper::proto::h1::dispatch::Server<S> as hyper::proto::h1::dispatch::Dispatch>::poll_msg
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:405
  55: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:263
  56: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:130
  57: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:106
  58: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:93
  59: <hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/proto/h1/dispatch.rs:374
  60: <futures::future::either::Either<A,B> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/either.rs:35
  61: futures::future::option::<impl futures::future::Future for core::option::Option<F>>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/option.rs:12
  62: <hyper::server::conn::Connection<I,S,E> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.12.35/src/server/conn.rs:636
  63: <futures::future::map_err::MapErr<A,F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/map_err.rs:30
  64: <alloc::boxed::Box<F> as futures::future::Future>::poll
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/mod.rs:113
  65: futures::task_impl::Spawn<T>::poll_future_notify::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/mod.rs:329
  66: futures::task_impl::Spawn<T>::enter::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/mod.rs:399
  67: futures::task_impl::std::set
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/std/mod.rs:83
  68: futures::task_impl::Spawn<T>::enter
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/mod.rs:399
  69: futures::task_impl::Spawn<T>::poll_fn_notify
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/mod.rs:291
  70: futures::task_impl::Spawn<T>::poll_future_notify
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/task_impl/mod.rs:329
  71: tokio_threadpool::task::Task::run::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/task/mod.rs:145
  72: core::ops::function::FnOnce::call_once
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ops/function.rs:231
  73: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panic.rs:315
  74: std::panicking::try::do_call
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panicking.rs:296
  75: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:82
  76: std::panicking::try
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panicking.rs:275
  77: std::panic::catch_unwind
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panic.rs:394
  78: tokio_threadpool::task::Task::run
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/task/mod.rs:130
  79: tokio_threadpool::worker::Worker::run_task2
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:567
  80: tokio_threadpool::worker::Worker::run_task
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:459
  81: tokio_threadpool::worker::Worker::try_run_owned_task
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:390
  82: tokio_threadpool::worker::Worker::try_run_task
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:297
  83: tokio_threadpool::worker::Worker::run
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:241
  84: tokio::runtime::threadpool::builder::Builder::build::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.22/src/runtime/threadpool/builder.rs:390
  85: tokio_timer::timer::handle::with_default::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.11/src/timer/handle.rs:101
  86: std::thread::local::LocalKey<T>::try_with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:257
  87: std::thread::local::LocalKey<T>::with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:234
  88: tokio_timer::timer::handle::with_default
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.11/src/timer/handle.rs:84
  89: tokio::runtime::threadpool::builder::Builder::build::{{closure}}::{{closure}}::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.22/src/runtime/threadpool/builder.rs:382
  90: tokio_timer::clock::clock::with_default::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.11/src/clock/clock.rs:137
  91: std::thread::local::LocalKey<T>::try_with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:257
  92: std::thread::local::LocalKey<T>::with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:234
  93: tokio_timer::clock::clock::with_default
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.11/src/clock/clock.rs:117
  94: tokio::runtime::threadpool::builder::Builder::build::{{closure}}::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.22/src/runtime/threadpool/builder.rs:381
  95: tokio_reactor::with_default::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.10/src/lib.rs:237
  96: std::thread::local::LocalKey<T>::try_with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:257
  97: std::thread::local::LocalKey<T>::with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:234
  98: tokio_reactor::with_default
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.10/src/lib.rs:217
  99: tokio::runtime::threadpool::builder::Builder::build::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.22/src/runtime/threadpool/builder.rs:380
 100: tokio_threadpool::callback::Callback::call
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/callback.rs:22
 101: tokio_threadpool::worker::Worker::do_run::{{closure}}::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:127
 102: tokio_executor::global::with_default::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.8/src/global.rs:209
 103: std::thread::local::LocalKey<T>::try_with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:257
 104: std::thread::local::LocalKey<T>::with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:234
 105: tokio_executor::global::with_default
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.8/src/global.rs:178
 106: tokio_threadpool::worker::Worker::do_run::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:125
 107: std::thread::local::LocalKey<T>::try_with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:257
 108: std::thread::local::LocalKey<T>::with
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/local.rs:234
 109: tokio_threadpool::worker::Worker::do_run
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:116
 110: tokio_threadpool::pool::Pool::spawn_thread::{{closure}}
             at /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/pool/mod.rs:345
 111: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/sys_common/backtrace.rs:77
 112: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/mod.rs:470
 113: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panic.rs:315
 114: std::panicking::try::do_call
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panicking.rs:296
 115: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:82
 116: std::panicking::try
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panicking.rs:275
 117: std::panic::catch_unwind
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/panic.rs:394
 118: std::thread::Builder::spawn_unchecked::{{closure}}
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/thread/mod.rs:469
 119: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ops/function.rs:231
 120: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/boxed.rs:746
 121: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/boxed.rs:746
      std::sys_common::thread::start_thread
             at src/libstd/sys_common/thread.rs:13
      std::sys::unix::thread::Thread::new::thread_start
             at src/libstd/sys/unix/thread.rs:79
 122: <unknown>
 123: <unknown>

Obviously this deserializer:

/// Storage key.
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug, Hash, PartialOrd, Ord, Clone))]
pub struct StorageKey(
	#[cfg_attr(feature = "std", serde(with="impl_serde::serialize"))]
	pub Vec<u8>,
);

Crashes when the hash has invalid size.

@bkchr
Copy link
Member

bkchr commented Oct 17, 2019

Does the node crash, aka ends or just prints this message?

@alexeuler
Copy link
Contributor Author

alexeuler commented Oct 21, 2019

Does the node crash, aka ends or just prints this message?

Stops working, i.e. crashes

@bkchr
Copy link
Member

bkchr commented Oct 21, 2019

CC @tomusdrw sounds like the node hangs, after we got a faulty input via jsonrpc.

@tomusdrw tomusdrw self-assigned this Oct 21, 2019
@bkchr
Copy link
Member

bkchr commented Oct 22, 2019

Fixed by #3866

@bkchr bkchr closed this as completed Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants