Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base_node panics with config setting: check_interval = 0 #4399

Closed
hansieodendaal opened this issue Aug 5, 2022 · 1 comment
Closed

base_node panics with config setting: check_interval = 0 #4399

hansieodendaal opened this issue Aug 5, 2022 · 1 comment
Labels
E-good_first_issue Experience Level - Good for newcomers

Comments

@hansieodendaal
Copy link
Contributor

Describe the bug

This setting in the config.toml gets the base node to panic:

# This interval in seconds to check for software updates. Setting this to 0 disables checking.
check_interval = 0

To Reproduce

Run the base node with config option as above.

Expected behavior

Should not panic.

Screenshots

thread 'tokio-runtime-worker' panicked at '`period` must be non-zero.', base_layer\p2p\src\auto_update\service.rs:98:36
stack backtrace:

                                            ▄▄▄▄▄▄▄                                                                                  
  ▄▄▄  ▓██▄     ░                      ▄▒█████████████▄                       ░▐  ░▐                           ▄▄▄▄          ▄▄▄▄    
  ▀███▄ ▀▓█▓     ░                   ▄▓█████████████████▌                      ░░░░ ▒ ░                      ███████▄      ▄███████  
 ▄▄ ▀▓██▄ ▓██▄      ▓███            ▓█████████████████████▄                  ░▄▄▒░▒▄▒░░░░░                 ▐█████████▌    ██████████ 
▐▓██▄ ▀███▄▐███▄   ▐▓▓▓            ▓▌  ▄▄▄▄  ░▀▀▀  ▄▄▄▄▄  ▓░               ▒▒▓▓▀▒▀▓▓▓▒░░░░░░               ███████████   ▐███████████
  ▀▓██▌ ▀███▓████▄▄██▓▒            ▓▓ ▐██ ░░   ▄  ░░ ███░▐▓▒             ▐▒▒▓▓▓▄ ▄▓▓▓▒▒░ ░░░              ▐▐█░   █████▌  ▀██   ▀█████
  ▄ ▐▓██▌░▓███████████▓           ▐▒▓▌▐███▄▄  ▓█▌ ▄▄████ ▓▓▒            ▌▒▒▓▓▓▓▓▓▓▓▓▓▒▒▒░ ░░                     ▐████▌        ░█████
 ▀██▓▄▐███████████████▓░           ▒▓▓▓▄▄▄▄▄▄█████▄▄▄▄▄▄█▓▒▒           ██▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒                  ░   ▄▒█████▒  ░    ▒██████
   ▀▓██▄▄████████████▓▓▒            ▒▓▓▓▓ ▀▀██████▀▀ ▓▓▓▓▒▒           ▀▀██▌▒▒░░░░░░░░░▒▒▒▒                 ▀█████████▌    ██████████░
      ▓█████████████▓▒▒              ▒▒▓▓▓▓       ▓▓▓▓▓▒▒░            ▒▒███▒       ░░▒▒▒▒▒                  ▀███████▌      ████████░ 
        ▀▓███████▓▓▓▒▒                 ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓░                            ░▒▒▒▀                     ▀▀█▀▀          ▀██▀▀    
           ▀▓▓▓▓▓▒▒▒                       ▀▒▒▒▒▒▒▀                                                                                  
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                           ▄▄▄▄▄▄▄▄▄▄        ▄▄      ▄▄▄▄▄▄▄▄▄▄    ▄▄▄▄▄▄                                            
                                           ██ ▀███ ▐█      ▐████      ████   ███    ▐███                                             
                                              ▐███        ███  ███    ███▌   ███    ▐███                                             
                                              ▐███      ███▌    ███▌  ████▄▄▄██▀    ▐███                                             
                                              ▐███      ███████████▌  ███▌ ███▌     ▐███                                             
                                              ▐███      ███▌    ███▌  ███▌   ███    ▐███                                             
                                             ▄████▄▄    ███▌    ███▌ ▄███▌   ███   ▄████▄                                            

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                   │
│                                                             ▄███████▄                                                             │
│                                                          ▄████▀  ▀▀████▄                                                          │
│                                                       ▄███▀          ▀▀███▄                                                       │
│                                                      █████████▄▄         ▀██                                                      │
│                                                      ██▌  ▀▀▀███████▄▄   ▐██                                                      │
│                                                      ██▌       ██ ▀▀████████                                                      │
│                                                       ▀██▄     ██      ▄██▀                                                       │
│                                                         ▀██▄   ██    ▄██▀                                                         │
│                                                           ▀██▄ ██  ▄██▀                                                           │
│                                                             ▀███████▀                                                             │
│                                                               ▀███▀                                                               │
│                                                                 ▀                                                                 │
│                                                                                                                                   │
│                                                           Tari Base Node                                                          │
│                                                           ~~~~~~~~~~~~~~                                                          │
│                                        Copyright 2019-2022. The Tari Development Community                                        │
│                                  Version 0.34.0-9f7e7518d87549bc664b75cf4a25d1a9d30d07a7-release                                  │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                                              Commands                                                             │
│                                                              ~~~~~~~~                                                             │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                  version                 check-for-updates                 status                                 │
│                             get-chain-metadata             get-db-stats                  get-peer                                 │
│                                list-peers                   dial-peer                    ping-peer                                │
│                            reset-offline-peers           rewind-blockchain                ban-peer                                │
│                                unban-peer                unban-all-peers             list-banned-peers                            │
│                              list-connections              list-headers                  check-db                                 │
│                                period-stats                header-stats                block-timing                               │
│                               list-reorgs                 discover-peer                  get-block                                │
│                               search-utxo                 search-kernel              get-mempool-stats                            │
│                             get-mempool-state             get-mempool-tx                  whoami                                  │
│                              get-state-info             get-network-stats                  quit                                   │
 │                                   exit                        watch                                                               │
 └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
 0:     0x7ff6e3fd4a8f - std::backtrace_rs::backtrace::dbghelp::trace
 12:57 v0.34.0, esmeralda, State: Listening, Tip: 34 (Fri, 05 Aug 2022 10:42:56 +0000), Mempool: 0tx (0g, +/- 0blks), Connections: 0, Banned: 0, Messages (last 60s): 0, Rpc: 0/10000
                              at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff6e3fd4a8f - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff6e3fd4a8f - std::sys_common::backtrace::_print_fmt
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\sys_common\backtrace.rs:66
   3:     0x7ff6e3fd4a8f - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\sys_common\backtrace.rs:45
   4:     0x7ff6e3ff1a3a - core::fmt::write
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\core\src\fmt\mod.rs:1194
   5:     0x7ff6e3fccba9 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\io\mod.rs:1655
   6:     0x7ff6e3fd6feb - std::sys_common::backtrace::_print
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\sys_common\backtrace.rs:48
   7:     0x7ff6e3fd6feb - std::sys_common::backtrace::print
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\sys_common\backtrace.rs:35
   8:     0x7ff6e3fd6feb - std::panicking::default_hook::closure$1
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\panicking.rs:295
   9:     0x7ff6e3fd6bde - std::panicking::default_hook
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\panicking.rs:314
  10:     0x7ff6e3fd75e1 - std::panicking::rust_panic_with_hook
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\panicking.rs:698
  11:     0x7ff6e3e21fda - std::thread::Builder::spawn::h167a80365415f293
  12:     0x7ff6e3e21ad7 - std::sys_common::backtrace::__rust_end_short_backtrace::hcf1642651ab2a27c
  13:     0x7ff6e4267b2d - std::panicking::begin_panic::hec79302b9dc0ed2b
  14:     0x7ff6e3e231ad - tokio::time::interval::interval::h7913cef6f2ec796b
  15:     0x7ff6e39886c4 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h25f1665de5f946ac
  16:     0x7ff6e38f3454 - <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll::h04c579621fdefd57
  17:     0x7ff6e398cacd - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h4399141c3ff0d031
  18:     0x7ff6e39c5453 - tokio::runtime::task::harness::Harness<T,S>::poll::h2224a1dd69bd74f9
  19:     0x7ff6e3e19fef - std::thread::local::LocalKey<T>::with::h64ad67dd1657adee
  20:     0x7ff6e3e2e7d2 - tokio::runtime::thread_pool::worker::Context::run::h5147b6d017f28ef6
  21:     0x7ff6e3e2e03b - tokio::runtime::thread_pool::worker::Context::run::h5147b6d017f28ef6
  22:     0x7ff6e3e22701 - tokio::macros::scoped_tls::ScopedKey<T>::set::hadee62f5b85f0a0f
  23:     0x7ff6e3e2d90a - tokio::runtime::thread_pool::worker::run::h9ef8c19af867bfb3
  24:     0x7ff6e3e1a7f9 - tokio::runtime::task::core::CoreStage<T>::poll::hdf562074896db0d1
  25:     0x7ff6e3e23c2e - tokio::runtime::task::harness::Harness<T,S>::poll::h4efd81787b74fe26
  26:     0x7ff6e3e1795c - tokio::runtime::blocking::pool::Inner::run::hdf8c417b615075e0
  27:     0x7ff6e3e21b64 - std::sys_common::backtrace::__rust_begin_short_backtrace::h29f0a3ff414d8be3
  28:     0x7ff6e3e22058 - <&T as core::fmt::Debug>::fmt::h2a98bcda29a46e3a
  29:     0x7ff6e3fdd26c - alloc::boxed::impl$44::call_once
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77\library\alloc\src\boxed.rs:1866
  30:     0x7ff6e3fdd26c - alloc::boxed::impl$44::call_once
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77\library\alloc\src\boxed.rs:1866
  31:     0x7ff6e3fdd26c - std::sys::windows::thread::impl$0::new::thread_start
                               at /rustc/7c4b47696907d64eff5621a64eb3c6e795a9ec77/library\std\src\sys\windows\thread.rs:57
  32:     0x7ffe2ec27034 - BaseThreadInitThunk
  33:     0x7ffe30322651 - RtlUserThreadStart

Press any key to continue . . .

Desktop (please complete the following information):

Windwos 10

Smartphone (please complete the following information):

n/a

Additional context

n/a

@hansieodendaal hansieodendaal changed the title [TITLE] base_node panics with config setting: check_interval = 0 Aug 5, 2022
@CjS77 CjS77 added the E-good_first_issue Experience Level - Good for newcomers label Aug 7, 2022
aviator-app bot pushed a commit that referenced this issue Aug 18, 2022
…#4495)

Description
--
This PR served for fixing the bug described in #4399 

Motivation and Context
---
My target is finding a way to change it with as little change and minimal impact as possible. So here's how I can think of it. I'm not sure if this is the best solution. Any comments are welcome.

How Has This Been Tested?
---
Build runs in local fork, with `check_interval` = 0 and w/o `check_interval` setting.
@SWvheerden
Copy link
Collaborator

Fixed in: #4399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-good_first_issue Experience Level - Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

3 participants