hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.61k stars 1.6k forks source link

panicked at dispatch dropped without returning error #2892

Open frolovdev opened 2 years ago

frolovdev commented 2 years ago

Hi there, thanks for your awesome work

Version

name = "hyper"
version = "0.14.19"

Platform

Screen Shot 2022-06-11 at 9 32 18 PM

Description

I use wiremock which underlines use hyper, I started to write tests but faced next flaky error

---- github_provider::tests::create_source_tree::success stdout ----
thread 'github_provider::tests::create_source_tree::success' panicked at 'dispatch dropped without returning error', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/conn.rs:329:35

Running with backtrace=1

  0: rust_begin_unwind
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
   2: core::panicking::assert_failed_inner
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:188:17
   3: core::panicking::assert_failed
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:145:5
   4: syncy::github_provider::tests::create_source_tree::success::{{closure}}
             at ./src/github_provider.rs:646:13
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
   7: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:507:48
   8: tokio::coop::with_budget::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:102:9
   9: std::thread::local::LocalKey<T>::try_with
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:399:16
  10: std::thread::local::LocalKey<T>::with
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:375:9
  11: tokio::coop::with_budget
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:95:5
  12: tokio::coop::budget
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:72:5
  13: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:507:25
  14: tokio::runtime::basic_scheduler::Context::enter
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:361:19
  15: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:506:36
  16: tokio::runtime::basic_scheduler::CoreGuard::enter::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:564:57
  17: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/macros/scoped_tls.rs:61:9
  18: tokio::runtime::basic_scheduler::CoreGuard::enter
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:564:27
  19: tokio::runtime::basic_scheduler::CoreGuard::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:497:9
  20: tokio::runtime::basic_scheduler::BasicScheduler::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:173:24
  21: tokio::runtime::Runtime::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/mod.rs:475:46
  22: syncy::github_provider::tests::create_source_tree::success
             at ./src/github_provider.rs:648:13
  23: syncy::github_provider::tests::create_source_tree::success::{{closure}}
             at ./src/github_provider.rs:569:15
  24: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
  25: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- github_provider::tests::create_source_tree::complex_case stdout ----
thread 'github_provider::tests::create_source_tree::complex_case' panicked at 'dispatch dropped without returning error', /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/conn.rs:329:35
stack backtrace:
   0: std::panicking::begin_panic
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:525:12
   1: hyper::client::conn::SendRequest<B>::send_request_retryable::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/conn.rs:329:35
   2: <T as futures_util::fns::FnOnce1<A>>::call_once
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/fns.rs:15:9
   3: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:57:73
   4: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
   5: <futures_util::future::future::flatten::Flatten<Fut,<Fut as core::future::future::Future>::Output> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/flatten.rs:50:36
   6: <futures_util::future::future::Then<Fut1,Fut2,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
   7: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/either.rs:89:32
   8: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/either.rs:89:32
   9: <F as futures_core::future::TryFuture>::try_poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.21/src/future.rs:82:9
  10: <futures_util::future::try_future::into_future::IntoFuture<Fut> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/try_future/into_future.rs:34:9
  11: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:55:37
  12: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
  13: <futures_util::future::try_future::MapErr<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
  14: <F as futures_core::future::TryFuture>::try_poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.21/src/future.rs:82:9
  15: <futures_util::future::try_future::into_future::IntoFuture<Fut> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/try_future/into_future.rs:34:9
  16: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:55:37
  17: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
  18: <futures_util::future::try_future::MapOk<Fut,F> as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13
  19: hyper::client::client::Client<C,B>::send_request::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:300:23
  20: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  21: hyper::client::client::Client<C,B>::retryably_send_request::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:200:25
  22: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  23: <hyper::client::client::ResponseFuture as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:611:9
  24: <reqwest::async_impl::client::PendingRequest as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.10/src/async_impl/client.rs:1780:29
  25: <reqwest::async_impl::client::Pending as core::future::future::Future>::poll
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.10/src/async_impl/client.rs:1759:51
  26: octocrab::Octocrab::execute::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/octocrab-0.15.4/src/lib.rs:831:26
  27: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  28: octocrab::Octocrab::_get::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/octocrab-0.15.4/src/lib.rs:664:9
  29: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  30: octocrab::Octocrab::get::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/octocrab-0.15.4/src/lib.rs:648:24
  31: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  32: octocrab::api::repos::file::GetContentBuilder::send::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/octocrab-0.15.4/src/api/repos/file.rs:44:9
  33: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  34: syncy::github_provider::get_repo::{{closure}}
             at ./src/github_provider.rs:291:5
  35: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  36: syncy::github_provider::unwrap_file::{{closure}}
             at ./src/github_provider.rs:252:25
  37: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  38: syncy::github_provider::fill_tree_with_nodes::{{closure}}
             at ./src/github_provider.rs:233:21
  39: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  40: syncy::github_provider::unwrap_folder::{{closure}}
             at ./src/github_provider.rs:281:5
  41: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  42: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  43: syncy::github_provider::fill_tree_with_nodes::{{closure}}
             at ./src/github_provider.rs:235:21
  44: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  45: <syncy::github_provider::GithubProvider as syncy::provider::Provider<alloc::sync::Arc<octocrab::Octocrab>>>::create_source_tree::{{closure}}
             at ./src/github_provider.rs:57:9
  46: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  47: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  48: syncy::github_provider::tests::create_source_tree::complex_case::{{closure}}
             at ./src/github_provider.rs:734:31
  49: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  50: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  51: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:507:48
  52: tokio::coop::with_budget::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:102:9
  53: std::thread::local::LocalKey<T>::try_with
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:399:16
  54: std::thread::local::LocalKey<T>::with
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/thread/local.rs:375:9
  55: tokio::coop::with_budget
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:95:5
  56: tokio::coop::budget
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/coop.rs:72:5
  57: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:507:25
  58: tokio::runtime::basic_scheduler::Context::enter
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:361:19
  59: tokio::runtime::basic_scheduler::CoreGuard::block_on::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:506:36
  60: tokio::runtime::basic_scheduler::CoreGuard::enter::{{closure}}
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:564:57
  61: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/macros/scoped_tls.rs:61:9
  62: tokio::runtime::basic_scheduler::CoreGuard::enter
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:564:27
  63: tokio::runtime::basic_scheduler::CoreGuard::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:497:9
  64: tokio::runtime::basic_scheduler::BasicScheduler::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/basic_scheduler.rs:173:24
  65: tokio::runtime::Runtime::block_on
             at /Users/andreyfrolov/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.2/src/runtime/mod.rs:475:46
  66: syncy::github_provider::tests::create_source_tree::complex_case
             at ./src/github_provider.rs:758:13
  67: syncy::github_provider::tests::create_source_tree::complex_case::{{closure}}
             at ./src/github_provider.rs:652:15
  68: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
  69: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

[short summary of the bug]

Here's the reproduction repo with an actual bug, just run the tests:

https://github.com/frolovdev/syncy

[code sample that causes the bug]

github_provider.rs

tests if run them in parallel (more than 1 thread)

I expected to see this happen: tests passed

Instead, this happened: sometimes it works, sometimes not

lifegpc commented 2 years ago

Got same error when testing my code. image

lifegpc commented 2 years ago

Got same error when testing my code. image

Now it seems happened everytime I run test

Error Stack ``` ---- fanbox_api::test_list_supporting_plan stdout ---- GET https://api.fanbox.cc/plan.listSupporting thread 'fanbox_api::test_list_supporting_plan' panicked at 'dispatch dropped without returning error', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/conn.rs:329:35 stack backtrace: 0: 0x55e8607b9e2d - std::backtrace_rs::backtrace::libunwind::trace::h7a926b2032699775 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x55e8607b9e2d - std::backtrace_rs::backtrace::trace_unsynchronized::h2d3d408762c23e47 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x55e8607b9e2d - std::sys_common::backtrace::_print_fmt::h24dd014972ee0b6e at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:66:5 3: 0x55e8607b9e2d - ::fmt::h566854fd172f06bc at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:45:22 4: 0x55e8607e062c - core::fmt::write::h56c1eb76bd5c87c8 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/fmt/mod.rs:1196:17 5: 0x55e8607b34c1 - std::io::Write::write_fmt::h8d38ba34eec3fec5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/io/mod.rs:1672:15 6: 0x55e8607bb8d5 - std::sys_common::backtrace::_print::hc7d36740cfaf072f at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:48:5 7: 0x55e8607bb8d5 - std::sys_common::backtrace::print::h33a30c8305581751 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:35:9 8: 0x55e8607bb8d5 - std::panicking::default_hook::{{closure}}::hb07a10016924ba07 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:295:22 9: 0x55e8607bb579 - std::panicking::default_hook::h4dbb3420eca4773d at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:311:9 10: 0x55e8607bbe66 - std::panicking::rust_panic_with_hook::h11d9659c53a62795 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:698:17 11: 0x55e8605f3b08 - std::panicking::begin_panic::{{closure}}::hf55cd388ba6eb950 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:617:9 12: 0x55e8605f4059 - std::sys_common::backtrace::__rust_end_short_backtrace::h6011fc636df819cb at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:138:18 13: 0x55e8605f3a53 - std::panicking::begin_panic::he9e980d27e6151b4 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:616:12 14: 0x55e86018c578 - hyper::client::conn::SendRequest::send_request_retryable::{{closure}}::h2cc7dfd5899f529a at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/conn.rs:329:35 15: 0x55e860182a69 - >::call_once::h71242fa9640de1ac at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/fns.rs:15:9 16: 0x55e8601a5dcf - as core::future::future::Future>::poll::h6059bb25898b68ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:57:73 17: 0x55e8600ed0a8 - as core::future::future::Future>::poll::h66896b64f9ba1bf4 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 18: 0x55e8600d8b87 - ::Output> as core::future::future::Future>::poll::h53c8988239cbe176 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/flatten.rs:50:36 19: 0x55e8600cce78 - as core::future::future::Future>::poll::h89c3091b8bfd4012 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 20: 0x55e860252db7 - as core::future::future::Future>::poll::h028ad6e1a49a308c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/either.rs:89:32 21: 0x55e860252f67 - as core::future::future::Future>::poll::h374c4fc606331035 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/either.rs:89:32 22: 0x55e86024593b - ::try_poll::h32f64f4f2f96af50 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.21/src/future.rs:82:9 23: 0x55e8601a85b8 - as core::future::future::Future>::poll::hf2b9c6d4a8b76643 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/try_future/into_future.rs:34:9 24: 0x55e8601a6b0e - as core::future::future::Future>::poll::hcd7122d3762b6e26 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:55:37 25: 0x55e8600ed048 - as core::future::future::Future>::poll::h6615f7ee875ee581 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 26: 0x55e86013a5a8 - as core::future::future::Future>::poll::h03fb86506e2ccfea at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 27: 0x55e860149f5b - ::try_poll::h1efbd0fe66a4ab1b at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-0.3.21/src/future.rs:82:9 28: 0x55e8601a83e8 - as core::future::future::Future>::poll::h3c5fb529e5260e4a at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/try_future/into_future.rs:34:9 29: 0x55e8601a4c8e - as core::future::future::Future>::poll::h0dd8f6533ac7e455 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/future/future/map.rs:55:37 30: 0x55e8600ed228 - as core::future::future::Future>::poll::h8ad2e5e52d409d4a at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 31: 0x55e86013a4e8 - as core::future::future::Future>::poll::hecd2f5f4388d640b at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.21/src/lib.rs:91:13 32: 0x55e86016028d - hyper::client::client::Client::send_request::{{closure}}::he5e066eed9cc0470 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:300:26 33: 0x55e860100289 - as core::future::future::Future>::poll::hf9d70609950f1f62 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 34: 0x55e8601630ae - hyper::client::client::Client::retryably_send_request::{{closure}}::h65f03099cf48b9a6 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:200:65 35: 0x55e8600fce3b - as core::future::future::Future>::poll::h0354db356edb2cf3 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 36: 0x55e86051d1ae - ::poll::hc67b987a62493227 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.19/src/client/client.rs:611:9 37: 0x55e86010709c - ::poll::hb85b2b2011b7f892 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.11/src/async_impl/client.rs:1880:29 38: 0x55e860106dda - ::poll::hcd60c2cbc20c7938 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.11/src/async_impl/client.rs:1859:51 39: 0x55e85fc74e14 - pixiv_downloader::webclient::WebClient::_aget2::{{closure}}::h6990c932aff64ca9 at /workspaces/pixiv_downloader/src/webclient.rs:334:25 40: 0x55e85fc6af9f - as core::future::future::Future>::poll::ha354a97bcb96a2bb at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 41: 0x55e85fc72fa9 - pixiv_downloader::webclient::WebClient::get::{{closure}}::h34c23fe09b542c0e at /workspaces/pixiv_downloader/src/webclient.rs:303:62 42: 0x55e85fc6b0af - as core::future::future::Future>::poll::ha45ec46b578c3c09 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 43: 0x55e85fc535e4 - pixiv_downloader::fanbox_api::FanboxClient::list_supporting_plan::{{closure}}::h5078530687073aa0 at /workspaces/pixiv_downloader/src/fanbox_api.rs:181:9 44: 0x55e85fc6b1b1 - as core::future::future::Future>::poll::ha9a2c07ec69d02b5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 45: 0x55e85fc57a24 - pixiv_downloader::fanbox_api::test_list_supporting_plan::{{closure}}::{{closure}}::hd1390e9cbed5e4b4 at /workspaces/pixiv_downloader/src/fanbox_api.rs:294:1 46: 0x55e85fc6a68b - as core::future::future::Future>::poll::h7b021e3d415615ec at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 47: 0x55e85fc44c83 - as core::future::future::Future>::poll::hdff3c432861f04ca at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/time/timeout.rs:176:33 48: 0x55e85fc57311 - pixiv_downloader::fanbox_api::test_list_supporting_plan::{{closure}}::h8544577addb19d93 at /workspaces/pixiv_downloader/src/fanbox_api.rs:253:9 49: 0x55e85fc6b97b - as core::future::future::Future>::poll::hd5b63382ab97cf43 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/future/mod.rs:91:19 50: 0x55e85fbef870 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h62d4a34fb578ee8e at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/park/thread.rs:263:54 51: 0x55e85fbbcb50 - tokio::coop::with_budget::{{closure}}::hf81806201a969560 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/coop.rs:102:9 52: 0x55e85fbb52d1 - std::thread::local::LocalKey::try_with::h7ccddeaa3d72ecc6 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/thread/local.rs:445:16 53: 0x55e85fbb21fd - std::thread::local::LocalKey::with::h339cb02ed139104e at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/thread/local.rs:421:9 54: 0x55e85fbebfe0 - tokio::coop::with_budget::h87a6d88d40e29000 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/coop.rs:95:5 55: 0x55e85fbebfe0 - tokio::coop::budget::h3234d43ebe3848b6 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/coop.rs:72:5 56: 0x55e85fbebfe0 - tokio::park::thread::CachedParkThread::block_on::h544df8405e68b95e at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/park/thread.rs:263:31 57: 0x55e85fc92296 - tokio::runtime::enter::Enter::block_on::he6a965e175320da7 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/runtime/enter.rs:151:13 58: 0x55e85fbcf682 - tokio::runtime::thread_pool::ThreadPool::block_on::ha82bdafd59dd458e at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/runtime/thread_pool/mod.rs:90:9 59: 0x55e85fc90f63 - tokio::runtime::Runtime::block_on::h5cf083afd1163126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.19.2/src/runtime/mod.rs:482:43 60: 0x55e85fb9b0d5 - pixiv_downloader::fanbox_api::test_list_supporting_plan::hef7dfe8f63fcf20a at /workspaces/pixiv_downloader/src/fanbox_api.rs:253:9 61: 0x55e85fc570ca - pixiv_downloader::fanbox_api::test_list_supporting_plan::{{closure}}::ha3562c8f9cb42e7b at /workspaces/pixiv_downloader/src/fanbox_api.rs:253:9 62: 0x55e85fc0e1be - core::ops::function::FnOnce::call_once::h65e0ded44eb356d5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/ops/function.rs:248:5 63: 0x55e85fd27f73 - core::ops::function::FnOnce::call_once::hfdc87e9dce05250a at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/ops/function.rs:248:5 64: 0x55e85fd27f73 - test::__rust_begin_short_backtrace::h4375221d9611b84b at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/test/src/lib.rs:572:5 65: 0x55e85fd26d6a - as core::ops::function::FnOnce>::call_once::h02081ef6a5096a62 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/alloc/src/boxed.rs:1951:9 66: 0x55e85fd26d6a - as core::ops::function::FnOnce<()>>::call_once::h9779d6dda25e95f5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/panic/unwind_safe.rs:271:9 67: 0x55e85fd26d6a - std::panicking::try::do_call::h6d39da0f3d1d96dc at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:492:40 68: 0x55e85fd26d6a - std::panicking::try::ha65d4aecac14af18 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:456:19 69: 0x55e85fd26d6a - std::panic::catch_unwind::hac54644a97f879c5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panic.rs:137:14 70: 0x55e85fd26d6a - test::run_test_in_process::h820b8b333326b659 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/test/src/lib.rs:595:18 71: 0x55e85fd26d6a - test::run_test::run_test_inner::{{closure}}::h44f83ae0be49d648 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/test/src/lib.rs:489:39 72: 0x55e85fcf335d - test::run_test::run_test_inner::{{closure}}::h087c75e60acf7c0f at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/test/src/lib.rs:516:37 73: 0x55e85fcf335d - std::sys_common::backtrace::__rust_begin_short_backtrace::h280b74bca28c38f6 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys_common/backtrace.rs:122:18 74: 0x55e85fcf8cc8 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h4807c1dfdc434752 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/thread/mod.rs:501:17 75: 0x55e85fcf8cc8 - as core::ops::function::FnOnce<()>>::call_once::h6163b1cb62fe5f8f at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/panic/unwind_safe.rs:271:9 76: 0x55e85fcf8cc8 - std::panicking::try::do_call::h6f82f9a227e06d0a at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:492:40 77: 0x55e85fcf8cc8 - std::panicking::try::h026fd7e8692df2d2 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panicking.rs:456:19 78: 0x55e85fcf8cc8 - std::panic::catch_unwind::h5b873592804313b0 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/panic.rs:137:14 79: 0x55e85fcf8cc8 - std::thread::Builder::spawn_unchecked_::{{closure}}::ha6f24b3f889e40f5 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/thread/mod.rs:500:30 80: 0x55e85fcf8cc8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h4d460104ba9c0ba3 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/core/src/ops/function.rs:248:5 81: 0x55e8607c0fb3 - as core::ops::function::FnOnce>::call_once::he7c258be890a1644 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/alloc/src/boxed.rs:1951:9 82: 0x55e8607c0fb3 - as core::ops::function::FnOnce>::call_once::h20b4ca040d24e40b at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/alloc/src/boxed.rs:1951:9 83: 0x55e8607c0fb3 - std::sys::unix::thread::Thread::new::thread_start::ha415642a774b6db6 at /rustc/5750a6aa2777382bf421b726f234da23f990a953/library/std/src/sys/unix/thread.rs:108:17 84: 0x7fc655460b43 - start_thread at ./nptl/./nptl/pthread_create.c:442:8 85: 0x7fc6554f1bb4 - clone at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:100 86: 0x0 - ```

Environment: Codespaces with devcontainer (Docker file) Rustc version: rustc 1.63.0-nightly (5750a6aa2 2022-06-20)

Source code

lifegpc commented 2 years ago

Looks like share client across two or more tokio runtime will cause this problem.