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

Downgrade tokio deps to 0.2 (deadpool) #977

Closed
pjenvey opened this issue Jan 21, 2021 · 1 comment · Fixed by #978
Closed

Downgrade tokio deps to 0.2 (deadpool) #977

pjenvey opened this issue Jan 21, 2021 · 1 comment · Fixed by #978
Assignees
Labels
1 Estimate - xs - This is a trivial change with clearly defined parameters. bug Something isn't working

Comments

@pjenvey
Copy link
Member

pjenvey commented Jan 21, 2021

deadpool's recently upgraded to the latest tokio (0.3 then 1.0) which causes incompatibilities w/ actix-web's tokio 0.2 executor.

Somehow it managed to run ok under this executor until it attempted to use a tokio timer (which began being used for #973). The timer issue errors out with:

thread 'actix-rt:worker:12' panicked at 'there is no timer running, must be called from the context of Tokio runtime or `rt` is not enabled', /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.3.6/src/time/driver/handle.rs:74:13
stack backtrace:
   0:     0x55cebe59b6d0 - std::backtrace_rs::backtrace::libunwind::trace::h04d12fdcddff82aa
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
   1:     0x55cebe59b6d0 - std::backtrace_rs::backtrace::trace_unsynchronized::h1459b974b6fbe5e1
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55cebe59b6d0 - std::sys_common::backtrace::_print_fmt::h9b8396a669123d95
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55cebe59b6d0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he009dcaaa75eed60
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55cebe5c026c - core::fmt::write::h77b4746b0dea1dd3
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/fmt/mod.rs:1078:17
   5:     0x55cebe593b52 - std::io::Write::write_fmt::heb7e50902e98831c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/io/mod.rs:1518:15
   6:     0x55cebe59df45 - std::sys_common::backtrace::_print::h2d880c9e69a21be9
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55cebe59df45 - std::sys_common::backtrace::print::h5f02b1bb49f36879
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55cebe59df45 - std::panicking::default_hook::{{closure}}::h658e288a7a809b29
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:208:50
   9:     0x55cebe59dbe8 - std::panicking::default_hook::hb52d73f0da9a4bb8
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:227:9
  10:     0x55cebcefb256 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5e75b4c0967974a5
                               at /media/ext/pjenvey/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1321:9
  11:     0x55cebcef9fff - <sentry_panic::PanicIntegration as sentry_core::integration::Integration>::setup::{{closure}}::{{closure}}::h200563c26d072247
                               at /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/sentry-panic-0.19.1/src/lib.rs:59:17
  12:     0x55cebe59e706 - std::panicking::rust_panic_with_hook::hfe7e1c684e3e6462
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:597:17
  13:     0x55cebd4d480e - std::panicking::begin_panic::{{closure}}::he24309067a3f8fb1
                               at /media/ext/pjenvey/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:522:9
  14:     0x55cebd4d87a9 - std::sys_common::backtrace::__rust_end_short_backtrace::h42e1d357b8612855
                               at /media/ext/pjenvey/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:141:18
  15:     0x55cebd4d473b - std::panicking::begin_panic::h55098292cdf83d4b
                               at /media/ext/pjenvey/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:521:12
  16:     0x55cebd4d91b4 - tokio::time::driver::handle::Handle::current::hf38d47c909a2f3b6
                               at /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.3.6/src/time/driver/handle.rs:74:13
  17:     0x55cebd4da303 - tokio::time::driver::sleep::Sleep::new_timeout::h462ca9907077e221
                               at /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.3.6/src/time/driver/sleep.rs:74:22
  18:     0x55cebcd77405 - tokio::time::timeout::timeout::h4a84f9f736156adf
                               at /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.3.6/src/time/timeout.rs:52:17
  19:     0x55cebcc2a3a5 - deadpool::managed::apply_timeout::{{closure}}::h612bac31a54c878d
                               at /home/pjenvey/.cargo/registry/src/github.com-1ecc6299db9ec823/deadpool-0.6.0/src/managed/mod.rs:309:33

I'm not sure if there's any compatibility layer to handle this, so a quick fix is to downgrade (and ensure our deps are stuck on the older tokio until actix-web upgrades).

@pjenvey pjenvey added bug Something isn't working 1 Estimate - xs - This is a trivial change with clearly defined parameters. labels Jan 21, 2021
@pjenvey pjenvey self-assigned this Jan 21, 2021
pjenvey added a commit that referenced this issue Jan 21, 2021
needed for its timer usage (when enabling connection timeouts)

and set a default connection timeout

Closes #977, #976
@jrconlin
Copy link
Member

I think the compatibility was to enable rt, which we're doing. Downgrading is probably the best option now.

pjenvey added a commit that referenced this issue Jan 21, 2021
needed for its timer usage (when enabling connection timeouts)

and set a default connection timeout

Closes #977, #976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Estimate - xs - This is a trivial change with clearly defined parameters. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants