Skip to content

Test test_try_send_request is flaky #3740

Closed
@Darksonn

Description

@Darksonn

Tokio's CI suite runs all hyper tests on every PR. The test_try_send_request test failed on a PR that only changes documentation, so it is most likely the test that is flaky. The test failure happened on mac os.

failures:

---- conn::test_try_send_request stdout ----
thread 'conn::test_try_send_request' panicked at tests/client.rs:2123:13:
request was returned
stack backtrace:
   0: rust_begin_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:72:14
   2: client::conn::test_try_send_request::{{closure}}::{{closure}}
             at ./tests/client.rs:2123:13
   3: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/future/future.rs:123:9
   4: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/core.rs:329:17
   5: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/runner/work/tokio/tokio/tokio/src/loom/std/unsafe_cell.rs:16:9
   6: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/core.rs:318:13
   7: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/harness.rs:485:19
   8: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panic/unwind_safe.rs:272:9
   9: std::panicking::try::do_call
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:559:40
  10: ___rust_try
  11: std::panicking::try
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:523:19
  12: std::panic::catch_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panic.rs:149:14
  13: tokio::runtime::task::harness::poll_future
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/harness.rs:473:18
  14: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/harness.rs:208:27
  15: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/harness.rs:153:15
  16: tokio::runtime::task::raw::poll
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/raw.rs:271:5
  17: tokio::runtime::task::raw::RawTask::poll
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/raw.rs:201:18
  18: tokio::runtime::task::LocalNotified<S>::run
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/task/mod.rs:427:9
  19: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:714:25
  20: tokio::runtime::coop::with_budget
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/coop.rs:107:5
  21: tokio::runtime::coop::budget
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/coop.rs:73:5
  22: tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:348:43
  23: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:412:19
  24: tokio::runtime::scheduler::current_thread::Context::run_task
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:348:23
  25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:713:35
  26: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:751:68
  27: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context/scoped.rs:40:9
  28: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context.rs:180:26
  29: std::thread::local::LocalKey<T>::try_with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:283:12
  30: std::thread::local::LocalKey<T>::with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:260:9
  31: tokio::runtime::context::set_scheduler
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context.rs:180:9
  32: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:751:27
  33: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:660:19
  34: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:180:28
  35: tokio::runtime::context::runtime::enter_runtime
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context/runtime.rs:65:16
  36: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:168:9
  37: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/runtime.rs:361:47
  38: tokio::runtime::runtime::Runtime::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/runtime.rs:335:13
  39: client::conn::test_try_send_request
             at ./tests/client.rs:2061:9
  40: client::conn::test_try_send_request::{{closure}}
             at ./tests/client.rs:2045:37
  41: core::ops::function::FnOnce::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:[250](https://github.com/tokio-rs/tokio/actions/runs/10417542180/job/28852042160?pr=6773#step:8:251):5
  42: core::ops::function::FnOnce::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'conn::test_try_send_request' panicked at tests/client.rs:2126:10:
called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(96), "request was returned", ...)
stack backtrace:
   0: rust_begin_unwind
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/result.rs:1679:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/result.rs:1102:23
   4: client::conn::test_try_send_request::{{closure}}
             at ./tests/client.rs:2061:9
   5: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/future/future.rs:123:9
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/future/future.rs:123:9
   7: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:673:57
   8: tokio::runtime::coop::with_budget
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/coop.rs:107:5
   9: tokio::runtime::coop::budget
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/coop.rs:73:5
  10: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
error: test failed, to rerun pass `--test client`
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:673:25
  11: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:412:19
  12: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:672:36
  13: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:751:68
  14: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context/scoped.rs:40:9
  15: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context.rs:180:26
  16: std::thread::local::LocalKey<T>::try_with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:283:12
  17: std::thread::local::LocalKey<T>::with
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/thread/local.rs:[260](https://github.com/tokio-rs/tokio/actions/runs/10417542180/job/28852042160?pr=6773#step:8:261):9
  18: tokio::runtime::context::set_scheduler
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context.rs:180:9
  19: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:751:27
  20: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:660:19
  21: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:180:28
  22: tokio::runtime::context::runtime::enter_runtime
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/context/runtime.rs:65:16
  23: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/scheduler/current_thread/mod.rs:168:9
  24: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/runtime.rs:361:47
  25: tokio::runtime::runtime::Runtime::block_on
             at /Users/runner/work/tokio/tokio/tokio/src/runtime/runtime.rs:335:13
  26: client::conn::test_try_send_request
             at ./tests/client.rs:2061:9
  27: client::conn::test_try_send_request::{{closure}}
             at ./tests/client.rs:2045:37
  28: core::ops::function::FnOnce::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
  29: core::ops::function::FnOnce::call_once
             at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    conn::test_try_send_request

Tokio runs the hyper test suite on the latest tag, which is v1.4.1 in this case. The PR was based on Tokio master, specifically commit 56f3f40c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions