e3prom / rvrrpd Goto Github PK
View Code? Open in Web Editor NEWA lightweight, fast, and highly secure VRRP daemon.
License: Other
A lightweight, fast, and highly secure VRRP daemon.
License: Other
Run rvrrpd with daemon mode, pid file is created under user defined path, e.g., /usr/tmp/rvrrpd.pid in my case, yet it's empty and the pid is not being populated.
root@OPNsense:/var/tmp # ps -aux | grep rvrrpd
root 53016 0.0 0.2 55948 8248 - S 18:20 0:19.83 /usr/local/bin/rvrrpd -m2
root 60479 0.0 0.0 4548 2060 0 R+ 18:51 0:00.00 grep rvrrpd
root@OPNsense:/var/tmp # ls -la /var/tmp/rvrrpd.pid
-rw-r--r-- 1 root wheel 0 May 31 18:14 /var/tmp/rvrrpd.pid
Hi,
Just trying to see if this project is still ongoing
rVRRPd
is having continuous 100% CPU usage on FreeBSD:
# uname -a
FreeBSD lab-fbsd-01 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
truss
reports time-consuming read() syscalls:
# truss -c -H -p 67459
syscall seconds calls errors
sched_yield 0.001360020 24 0
write 0.004256053 112 0
read 2.994538834 26 10
compat11.kevent 6.007358899 33 0
_umtx_op 2.993348184 42 0
------------- ------- -------
12.000861990 237 10
along with returned errors:
101074: read(10,0x7fffdf7f7b40,128) ERR#35 'Resource temporarily unavailable'
By tracing the read()
system call with the file descriptor 10
, we can determine the calls comes from the rust tokio
library.
gdb
backtrace with break read if $rdi == 10
:
Thread 6 "tokio-runtime-worke" hit Breakpoint 1, 0x000000080159eaa4 in read () from /lib/libc.so.7
(gdb) bt
#0 0x000000080159eaa4 in read () from /lib/libc.so.7
#1 0x000000000145dfcb in <&std::fs::File as std::io::Read>::read ()
#2 0x00000000013ec6d8 in <&mio::sys::unix::io::Io as std::io::Read>::read (self=0x7fffdf7f7bd8, dst=...)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.6.19/src/sys/unix/io.rs:85
#3 0x00000000013dfdc0 in mio::sys::unix::awakener::pipe::Awakener::cleanup (self=0x802432238)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.6.19/src/sys/unix/awakener.rs:49
#4 0x00000000013d4a44 in mio::poll::Poll::poll2 (self=0x80245c0b0, events=0x802458268, timeout=..., interruptible=false)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.6.19/src/poll.rs:1182
#5 0x00000000013d4707 in mio::poll::Poll::poll1 (self=0x80245c0b0, events=0x802458268, timeout=..., interruptible=false)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.6.19/src/poll.rs:1139
#6 0x00000000013d4032 in mio::poll::Poll::poll (self=0x80245c0b0, events=0x802458268, timeout=...)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.6.19/src/poll.rs:1010
#7 0x0000000001341407 in tokio_reactor::Reactor::poll (self=0x802458268, max_wait=...)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.10/src/lib.rs:360
#8 0x0000000001341254 in tokio_reactor::Reactor::turn (self=0x802458268, max_wait=...)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.10/src/lib.rs:335
#9 0x0000000001342524 in <tokio_reactor::Reactor as tokio_executor::park::Park>::park_timeout (self=0x802458268, duration=...)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.10/src/lib.rs:464
#10 0x00000000013287a9 in <tokio_timer::timer::Timer<T,N> as tokio_executor::park::Park>::park (self=0x802458240)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.11/src/timer/mod.rs:369
#11 0x000000000132bb0d in <tokio_threadpool::park::boxed::BoxedPark<T> as tokio_executor::park::Park>::park (self=0x802458240)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/park/boxed.rs:29
#12 0x000000000138d6bf in tokio_threadpool::worker::entry::WorkerEntry::park (self=0x80249a300)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/entry.rs:220
#13 0x000000000139bef8 in tokio_threadpool::worker::Worker::sleep (self=0x7fffdf7f9a88)
[EDITED FOR BREVITY]
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/thread/local.rs:239
#40 0x0000000001399855 in tokio_threadpool::worker::Worker::do_run (self=0x7fffdf7f9a88)
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/worker/mod.rs:116
#41 0x000000000139f4a1 in tokio_threadpool::pool::Pool::spawn_thread::{{closure}} ()
at /home/eprom/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.16/src/pool/mod.rs:345
#42 0x000000000136b750 in std::sys_common::backtrace::__rust_begin_short_backtrace (f=...)
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/sys_common/backtrace.rs:77
#43 0x000000000138f3b1 in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} ()
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/thread/mod.rs:470
#44 0x000000000137eaa1 in <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=())
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/panic.rs:315
#45 0x0000000001375b77 in std::panicking::try::do_call (data=0x7fffdf7f9d28 "\000")
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/panicking.rs:296
#46 0x000000000146d3df in __rust_maybe_catch_panic ()
#47 0x0000000001375849 in std::panicking::try (f=...) at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/panicking.rs:275
#48 0x000000000137f781 in std::panic::catch_unwind (f=...) at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/panic.rs:394
#49 0x000000000138f1e2 in std::thread::Builder::spawn_unchecked::{{closure}} ()
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libstd/thread/mod.rs:469
#50 0x0000000001394b56 in core::ops::function::FnOnce::call_once{{vtable-shim}} ()
at /usr/ports/lang/rust/work/rustc-1.38.0-src/src/libcore/ops/function.rs:235
#51 0x000000000146a90f in <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once ()
#52 0x000000000145ff31 in std::sys_common::thread::start_thread ()
#53 0x000000000146ca69 in std::sys::unix::thread::Thread::new::thread_start ()
#54 0x00000008014e0776 in ?? () from /lib/libthr.so.3
#55 0x0000000000000000 in ?? ()
The worker thread trigger a panic in tokio-timer
interval.rs:31 when the VRRP host owns the Virtual IP Address (VIP). This issue can be easily reproduced with the default configuration and when the group's VIP equals a locally configured IP address.
thread '<unnamed>' panicked at '`duration` must be non-zero.', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.13/src/interval.rs:31:9
stack backtrace:
0: 0x1c18fe0 - std::backtrace_rs::backtrace::libunwind::trace::h38ada28f8aa6510e
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x1c18fe0 - std::backtrace_rs::backtrace::trace_unsynchronized::h36b70c2b5fb9402f
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x1c18fe0 - std::sys_common::backtrace::_print_fmt::h75a9de38378fe2b2
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:65:5
3: 0x1c18fe0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8899f1dc8f3e5c99
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:44:22
4: 0x1c3cf7e - core::fmt::write::h094021303b2105e6
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/fmt/mod.rs:1209:17
5: 0x1c135a5 - std::io::Write::write_fmt::h5a56bdbeb0116d07
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/io/mod.rs:1682:15
6: 0x1c18d95 - std::sys_common::backtrace::_print::h297dfecdf465761e
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:47:5
7: 0x1c18d95 - std::sys_common::backtrace::print::h94a1bd877d49065d
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:34:9
8: 0x1c1a4df - std::panicking::default_hook::{{closure}}::h93079119072659d4
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:267:22
9: 0x1c1a18d - std::panicking::default_hook::h782f6b9a3bf3f355
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:286:9
10: 0x1c1acbb - std::panicking::rust_panic_with_hook::h29eff63546532458
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:688:13
11: 0x1bbbfc8 - std::panicking::begin_panic::{{closure}}::h3ca69803906c63ed
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:608:9
12: 0x1bc2806 - std::sys_common::backtrace::__rust_end_short_backtrace::h1ccc43b0ec0b0d6e
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:137:18
13: 0x1bbbf00 - std::panicking::begin_panic::h77f63de955fc8724
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:607:12
14: 0x1944ccb - tokio_timer::interval::Interval::new::h86921bc64799b776
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.13/src/interval.rs:31:9
15: 0x1944d5c - tokio_timer::interval::Interval::new_interval::h3a02c5a0140da172
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.13/src/interval.rs:49:9
16: 0x140b074 - rVRRPd::timers::start_timers::h832e9d455b3e11bc
at /var/tmp/rVRRPd/src/timers.rs:58:27
17: 0x14f1574 - rVRRPd::fsm::fsm_run::{{closure}}::h69c272077cfce390
at /var/tmp/rVRRPd/src/fsm.rs:260:29
18: 0x144f2a5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h76ed9abe54d880fd
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys_common/backtrace.rs:121:18
19: 0x144b606 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h84633929044c8693
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/thread/mod.rs:551:17
20: 0x144e2c9 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h44f6173f23bed303
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/panic/unwind_safe.rs:271:9
21: 0x144ceca - std::panicking::try::do_call::h0eac242b22e06485
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:483:40
22: 0x144e21b - __rust_try
23: 0x144c280 - std::panicking::try::h550b26d1cd843213
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:447:19
24: 0x144bb49 - std::panic::catch_unwind::h373bf8ed9236a41c
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panic.rs:137:14
25: 0x144af58 - std::thread::Builder::spawn_unchecked_::{{closure}}::hd1c19446f7173ae2
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/thread/mod.rs:550:30
26: 0x147f13f - core::ops::function::FnOnce::call_once{{vtable.shim}}::hbc9d6086ed74184b
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/ops/function.rs:251:5
27: 0x1c1d4d3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3aa625e4f7fc532e
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/alloc/src/boxed.rs:1987:9
28: 0x1c1d4d3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5fe5761a69783522
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/alloc/src/boxed.rs:1987:9
29: 0x1c1d4d3 - std::sys::unix::thread::Thread::new::thread_start::h22df23c4ce6cbb23
at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/sys/unix/thread.rs:108:17
30: 0x80222bfd6 - <unknown>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.