paritytech / cachepot

cachepot is `sccache` with extra sec, which in turn is `ccache` with cloud storage

Home Page:https://cachepot.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tokio context issue on failed compilation unit

drahnr opened this issue · comments

Attempting to compile github.com/drahnr/honggfuzz-rs @ 99fec3373f8399b4664cda47f6b120a951e405be in dist mode with the following client config:

[dist]
scheduler_url = "https://internal.yada.youknow"
toolchains = []
toolchain_cache_size = 5368709120

[dist.auth]
type = "token"
token = "s3cr3tt0ken"

leads to

RUST_BACKTRACE=1 RUST_LOG=sccache=debug SCCACHE_START_SERVER=1 SCCACHE_NO_DAEMON=1 sccache
thread 'tokio-runtime-worker' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.', /home/bernhard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/runtime/enter.rs:38:5
stack backtrace:
   0: std::panicking::begin_panic
   1: tokio::runtime::enter::enter
   2: tokio::runtime::context::enter
   3: sccache::server::DistClientContainer::create_state
   4: sccache::server::DistClientContainer::get_client
   5: sccache::server::SccacheService<C>::handle_compile::{{closure}}
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: <futures_util::stream::try_stream::try_flatten::TryFlatten<St> as futures_core::stream::Stream>::poll_next
   8: <futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll
   9: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
  10: tokio::runtime::task::core::Core<T,S>::poll
  11: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  12: tokio::runtime::task::harness::Harness<T,S>::poll
  13: std::thread::local::LocalKey<T>::with
  14: tokio::runtime::thread_pool::worker::Context::run_task
  15: tokio::runtime::thread_pool::worker::Context::run
  16: tokio::macros::scoped_tls::ScopedKey<T>::set
  17: tokio::runtime::thread_pool::worker::run
  18: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  19: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  20: tokio::runtime::task::harness::Harness<T,S>::poll
  21: tokio::runtime::blocking::pool::Inner::run
  22: tokio::runtime::context::enter
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/server.rs:272:36
stack backtrace:
   0: rust_begin_unwind
             at /rustc/88f19c6dab716c6281af7602e30f413e809c5974/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/88f19c6dab716c6281af7602e30f413e809c5974/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/88f19c6dab716c6281af7602e30f413e809c5974/library/core/src/option.rs:1329:5
   3: sccache::server::DistClientContainer::get_client
   4: sccache::server::SccacheService<C>::handle_compile::{{closure}}
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   6: <futures_util::stream::try_stream::try_flatten::TryFlatten<St> as futures_core::stream::Stream>::poll_next
   7: <futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll
   8: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
   9: tokio::runtime::task::core::Core<T,S>::poll
  10: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  11: tokio::runtime::task::harness::Harness<T,S>::poll
  12: std::thread::local::LocalKey<T>::with
  13: tokio::runtime::thread_pool::worker::Context::run_task
  14: tokio::runtime::thread_pool::worker::Context::run
  15: tokio::macros::scoped_tls::ScopedKey<T>::set
  16: tokio::runtime::thread_pool::worker::run
  17: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  18: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  19: tokio::runtime::task::harness::Harness<T,S>::poll
  20: tokio::runtime::blocking::pool::Inner::run
  21: tokio::runtime::context::enter
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.