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

tokio-runtime-worker' panicked at 'supplied instant is later than self #600

Closed
stakeworks opened this issue Jan 15, 2021 · 23 comments
Closed

Comments

@stakeworks
Copy link

stakeworks commented Jan 15, 2021

Jan 15 09:23:04
Thread 'tokio-runtime-worker' panicked at 'supplied instant is later than self', library/std/src/time.rs:275
  30: __clone
  29: start_thread
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/sys/unix/thread.rs:87:17
      std::sys::unix::thread::Thread::new::thread_start
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/alloc/src/boxed.rs:1042:9
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/alloc/src/boxed.rs:1042:9
  28: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  27: core::ops::function::FnOnce::call_once{{vtable.shim}}
  26: std::sys_common::backtrace::__rust_begin_short_backtrace
  25: tokio::runtime::context::enter
  24: tokio::runtime::blocking::pool::Inner::run
  23: tokio::runtime::task::raw::poll
  22: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  21: tokio::runtime::task::core::Core<T,S>::poll
  20: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  19: tokio::runtime::thread_pool::worker::run
  18: tokio::macros::scoped_tls::ScopedKey<T>::set
  17: tokio::runtime::thread_pool::worker::Context::run
  16: tokio::runtime::thread_pool::worker::Context::run_task
  15: std::thread::local::LocalKey<T>::with
  14: tokio::runtime::task::harness::Harness<T,S>::poll
  13: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  12: tokio::runtime::task::core::Core<T,S>::poll
  11: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  10: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
   9: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
   8: <prometheus::histogram::HistogramTimer as core::ops::drop::Drop>::drop
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/time.rs:339:9
      std::time::Instant::elapsed
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/time.rs:400:9
      <std::time::Instant as core::ops::arith::Sub>::sub
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/time.rs:275:9
      std::time::Instant::duration_since
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/core/src/option.rs:346:21
   7: core::option::Option<T>::expect
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/core/src/option.rs:1226:5
   6: core::option::expect_failed
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/core/src/panicking.rs:85:14
   5: core::panicking::panic_fmt
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/panicking.rs:483:5
   4: rust_begin_unwind
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/sys_common/backtrace.rs:153:18
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/panicking.rs:484:9
   2: std::panicking::begin_panic_handler::{{closure}}
             at rustc/a1dfd2490a6cb456b92e469fa550dc217e20ad6d/library/std/src/panicking.rs:581:17
   1: std::panicking::rust_panic_with_hook
   0: sp_panic_handler::set::{{closure}}
Version: 0.8.8-97a8c44-x86_64-linux-gnu

Linux vmi424166.contaboserver.net 4.15.0-122-generic #124-Ubuntu SMP Thu Oct 15 13:03:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
@AurevoirXavier
Copy link
Member

Where did you get this error?

How to reproduce it?

@stakeworks
Copy link
Author

I noticed that one of my nodes had restarted and checked the journalctl. That's where I saw the error. The same error happened on the same server with a Plasm node. I don't know how to reproduce. Could a low open file descriptor limit be the cause, although it's same on others servers (4096)?

@AurevoirXavier
Copy link
Member

I noticed that one of my nodes had restarted and checked the journalctl. That's where I saw the error. The same error happened on the same server with a Plasm node. I don't know how to reproduce. Could a low open file descriptor limit be the cause, although it's same on others servers (4096)?

Similar to #560?

@stakeworks
Copy link
Author

I've set limit at 65535 and rebooted the server. Let's see what happens.

LimitNOFILE=65535

root soft nofile 65535
root hard nofile 65535

  • soft nofile 65535
  • hard nofile 65535

@AurevoirXavier
Copy link
Member

Which binary are you using?

Self-compiled or download from the release?

@stakeworks
Copy link
Author

Download from the release, just updated to Darwinia 0.8.9

@AurevoirXavier
Copy link
Member

I think this error is caused by the rustc version. But not sure.

@stakeworks
Copy link
Author

rustc is not installed,

@AurevoirXavier
Copy link
Member

I've set limit at 65535 and rebooted the server. Let's see what happens.

LimitNOFILE=65535

root soft nofile 65535
root hard nofile 65535

  • soft nofile 65535
  • hard nofile 65535

Did this work?

@stakeworks
Copy link
Author

stakeworks commented Jan 25, 2021

Correction: I've only set "LimitNOFILE=65535" in the service file. I don't see this error anymore, but I've restarted serveral times the last week because of updates, now running 0.9.0.

I do see these errors in the log in CVN0601:
Error importing block 0x1a3995f4678afb645b0681c077e19dfaab96501956eb7ce6a628880bafe8f26f: Err(UnknownParent)

Error importing block 0x0c7dab88a7603bb267cce0be0cd6a430a984a84afab5093d9514c6844bc2254d: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

ERROR Handler initialization process is too long with PeerId("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

WARN Polling the telemetry took more than 200ms

In CVN0301:
Error importing block 0x0ae3e3cff7529f413af6dc8f04698432e696fff7d09cda6d689fa65d0c92c0c0: Err(Other(ClientImport("Invalid operation in the pending changes tree: Tried to import or finalize node that is an ancestor of a previously finalized node")))

Error importing block 0x6badf3edfd5caa2c63e1d5942024678b1b726e788fe345115df28018a26aaf75:
Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

Error importing block 0xe2f72da2e90239e2cbd15bd690ef1e8186d09e99fc80f1d49fc700ccd59e3bbf: Err(UnknownParent)

@AurevoirXavier
Copy link
Member

Correction: I've only set "LimitNOFILE=65535" in the service file. I don't see this error anymore, but I've restarted serveral times the last week because of updates, now running 0.9.0.

I do see these errors in the log in CVN0601:
Error importing block 0x1a3995f4678afb645b0681c077e19dfaab96501956eb7ce6a628880bafe8f26f: Err(UnknownParent)

Error importing block 0x0c7dab88a7603bb267cce0be0cd6a430a984a84afab5093d9514c6844bc2254d: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

ERROR Handler initialization process is too long with PeerId("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

WARN Polling the telemetry took more than 200ms

In CVN0301:
Error importing block 0x0ae3e3cff7529f413af6dc8f04698432e696fff7d09cda6d689fa65d0c92c0c0: Err(Other(ClientImport("Invalid operation in the pending changes tree: Tried to import or finalize node that is an ancestor of a previously finalized node")))

Error importing block 0x6badf3edfd5caa2c63e1d5942024678b1b726e788fe345115df28018a26aaf75:
Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

Error importing block 0xe2f72da2e90239e2cbd15bd690ef1e8186d09e99fc80f1d49fc700ccd59e3bbf: Err(UnknownParent)

Could be closed now?

@stakeworks
Copy link
Author

Version both my validators: darwinia 0.9.5-e73932d-x86_64-linux-gnu
Ubuntu 18.04.5 LTS

I still see these errors occasionally.

2021-04-11 05:29:43 💔 Error importing block 0x23f9f8db607897f25c51977d3f23252fc538c9107cd62f278544f72101e01296: Err(UnknownParent)
2021-04-10 10:24:30 💔 Error importing block 0xfff690bd6444a8b1fbc37242759095e5adc3e84200010e592694347eab748231: Err(Other(ClientImport("Invalid operation in the pending changes tree: Tried to import or finalize node that is an ancestor of a previously finalized node")))
2021-04-05 07:24:45 💔 Error importing block 0x72cc55a61efcf6e755f7eab7adcf16943f7b2257800e0b87b1439ae98e5ddba9: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))
2021-04-05 06:02:34 Block prepare storage changes error:
2021-04-05 06:02:32 💔 Error importing block 0x9e00e1399a5cc38e7f8ad12a615f15477f1a93ed26674770eeb9b34ffe610436: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

@AurevoirXavier
Copy link
Member

Version both my validators: darwinia 0.9.5-e73932d-x86_64-linux-gnu
Ubuntu 18.04.5 LTS

I still see these errors occasionally.

2021-04-11 05:29:43 💔 Error importing block 0x23f9f8db607897f25c51977d3f23252fc538c9107cd62f278544f72101e01296: Err(UnknownParent)
2021-04-10 10:24:30 💔 Error importing block 0xfff690bd6444a8b1fbc37242759095e5adc3e84200010e592694347eab748231: Err(Other(ClientImport("Invalid operation in the pending changes tree: Tried to import or finalize node that is an ancestor of a previously finalized node")))
2021-04-05 07:24:45 💔 Error importing block 0x72cc55a61efcf6e755f7eab7adcf16943f7b2257800e0b87b1439ae98e5ddba9: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))
2021-04-05 06:02:34 Block prepare storage changes error:
2021-04-05 06:02:32 💔 Error importing block 0x9e00e1399a5cc38e7f8ad12a615f15477f1a93ed26674770eeb9b34ffe610436: Err(Other(ClientImport("Import failed: Potential long-range attack: block not in finalized chain.")))

Interesting. How about your Plasm node?

@stakeworks
Copy link
Author

The Plasm nodes, on both servers, don't have these errors in the last 14 days.

@AurevoirXavier
Copy link
Member

The Plasm nodes, on both servers, don't have these errors in the last 14 days.

We just release 0.9.6.

And 0.10.0 maybe come in next week.

I think one of them will solve this.

@stakeworks
Copy link
Author

Will upgrade when available and let you know.

@AurevoirXavier
Copy link
Member

AurevoirXavier commented Apr 12, 2021

Will upgrade when available and let you know.

I just ask @andresilva (the main developer of grandpa from paritytech)

So is this just a warning?
Actually, the node is still running. Can I ignore that?

---

yeah you can ignore that
the node should continue to still sync
there is kind of race condition between what you try to sync and what gets finalized (in particular depending on how little peers you have)
so probably the node tried to sync some fork, and by the time it got the blocks, they were already stale because something else got finalized
but it finalized the right thing and will keep syncing the main chain, so that is OK

@AurevoirXavier
Copy link
Member

BTW, if the nodes got panic. Re-open this. @wwwAndries

Currently all my nodes look good.

@stakeworks
Copy link
Author

stakeworks commented Apr 12, 2021 via email

@AurevoirXavier
Copy link
Member

AurevoirXavier commented Apr 12, 2021

In peers and I think more than 5 is safe.

@stakeworks
Copy link
Author

stakeworks commented Apr 12, 2021

Can you please remove the reference to my last message, my ip adresses are visible. My mistake, sorry.

@AurevoirXavier
Copy link
Member

Can you please remove the reference to my last message, my ip adresses are visible. My mistake, sorry.

Removed

@stakeworks
Copy link
Author

Thanks, updated to 0.9.6.

boundless-forest pushed a commit that referenced this issue Aug 1, 2023
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants