Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Panic on too many/large transactions #20

Closed
tomtau opened this issue Nov 20, 2018 · 1 comment
Closed

Panic on too many/large transactions #20

tomtau opened this issue Nov 20, 2018 · 1 comment
Labels

Comments

@tomtau
Copy link
Contributor

tomtau commented Nov 20, 2018

I'm running on Tendermint 0.25 with this patched version: 90dad48

With too many/large transactions, rust-tsp will panic:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: WriteZero, error: StringError("failed to write whole buffer") }', libcore/result.rs:1009:5

stack backtrace:

   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at libstd/panicking.rs:477
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:391
   6: std::panicking::try::do_call
             at libstd/panicking.rs:326
   7: core::ptr::drop_in_place
             at libcore/panicking.rs:77
   8: core::alloc::Layout::repeat
             at libcore/macros.rs:26
   9: <bytes::bytes::BytesMut as core::convert::AsRef<[u8]>>::as_ref
             at libcore/result.rs:808
  10: <protobuf::cached_size::CachedSize as core::default::Default>::default
             at ~/.cargo/git/checkouts/rust-tsp-6c1140b7f202a3ea/90dad48/src/server.rs:150
  11: abci::server::respond
             at ~/.cargo/git/checkouts/rust-tsp-6c1140b7f202a3ea/90dad48/src/server.rs:118
  12: abci::server::handle_stream
             at ~/.cargo/git/checkouts/rust-tsp-6c1140b7f202a3ea/90dad48/src/server.rs:62
  13: abci::server::serve::{{closure}}
             at ~/.cargo/git/checkouts/rust-tsp-6c1140b7f202a3ea/90dad48/src/server.rs:34
tomtau pushed a commit to tomtau/rust-tsp that referenced this issue Nov 21, 2018
…in tendermint/rust-tsp)

* added a mock stream to test the code and wrote a test to isolate the issue

* regenerated protobuf code with the latest rust-protobuf crate

* fixed the panic issue by checking the needed space and reserving more (if needed) before writing into the buffer
@tomtau
Copy link
Contributor Author

tomtau commented Nov 22, 2018

fix in #21

@melekes melekes added the bug label Nov 29, 2018
tomtau pushed a commit to tomtau/rust-tsp that referenced this issue Nov 30, 2018
…in tendermint/rust-tsp)

* added a mock stream to test the code and wrote a test to isolate the issue

* regenerated protobuf code with the latest rust-protobuf crate

* fixed the panic issue by checking the needed space and reserving more (if needed) before writing into the buffer
melekes pushed a commit that referenced this issue Nov 30, 2018
…mint/rust-tsp)

* added a mock stream to test the code and wrote a test to isolate the issue

* regenerated protobuf code with the latest rust-protobuf crate

* fixed the panic issue by checking the needed space and reserving more (if needed) before writing into the buffer
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants