avito-tech / bioyino

High performance and high-precision multithreaded StatsD server
The Unlicense
228 stars 20 forks source link

thread 'bioyino_udp0' panicked at 'assertion failed: self.remaining_mut() >= src.remaining()' #27

Closed dmitryikh closed 5 years ago

dmitryikh commented 5 years ago
thread 'bioyino_udp0' panicked at 'assertion failed: self.remaining_mut() >= src.remaining()', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.4.11/src/buf/buf_mut.rs:230:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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::rust_panic_with_hook
             at libstd/panicking.rs:477
   5: std::panicking::begin_panic
   6: bytes::buf::buf_mut::BufMut::put
   7: <futures::future::chain::Chain<A, B, C>>::poll
   8: futures::task_impl::std::set
   9: tokio_current_thread::CurrentRunner::set_spawn
  10: <tokio_current_thread::scheduler::Scheduler<U>>::tick
  11: <tokio_current_thread::Entered<'a, P>>::block_on
  12: <std::thread::local::LocalKey<T>>::with
  13: <std::thread::local::LocalKey<T>>::with
  14: <std::thread::local::LocalKey<T>>::with
  15: <std::thread::local::LocalKey<T>>::with
  16: tokio::runtime::current_thread::runtime::Runtime::block_on

I can reproduce the panic at my setup. Do you need some additional information to fix it up?

Albibek commented 5 years ago

Could you show the config you are running this on?

dmitryikh commented 5 years ago
verbosity = "warn"
n-threads = 1
w-threads = 1
task-queue-size = 1
start-as-leader = true
stats-interval = 10000
stats-prefix = "resources.monitoring.bioyino"
consensus = "none"

[metrics]
count-updates = true
update-counter-prefix = "resources.monitoring.bioyino.updates"
update-counter-suffix = ""
update-counter-threshold = 200

[carbon]
address = "127.0.0.1:2003"
interval = 30000
connect-delay = 250
connect-delay-multiplier = 2
connect-delay-max = 10000
send-retries = 30

[network]
listen = "0.0.0.0:8125"
peer-listen = "127.0.0.1:8136"
mgmt-listen = "127.0.0.1:8137"
bufsize = 1500
multimessage = false
mm-packets = 100
mm-async = false
buffer-flush-time = 30
buffer-flush-length = 65536
greens = 4
async-sockets = 4
nodes = []
snapshot-interval = 1000

[raft]
nodes = {}

[consul]
start-as = "disabled"
agent = "127.0.0.1:8500"
session-ttl = 11000
renew-time = 1000
key-name = "service/bioyino/lock"
Albibek commented 5 years ago

Oh, and what branch is it?

dmitryikh commented 5 years ago

From current master

Albibek commented 5 years ago

Fixed in https://github.com/avito-tech/bioyino/commit/270abc52c6af983a06f1c1c3512bacbe4ad090f0