Skip to content

unit test failure in ensure_gc_runs_when_dropping_cache #580

@alexanderkjall

Description

@alexanderkjall

Hi, when trying to build moka 0.12.13 in Debian we are seeing test failures in the ensure_gc_runs_when_dropping_cache test:

283s thread 'future::cache::tests::ensure_gc_runs_when_dropping_cache' (18884) panicked at src/future/cache.rs:5707:9:
283s assertion `left == right` failed
283s   left: 2
283s  right: 1
283s stack backtrace:
283s    0: __rustc::rust_begin_unwind
283s              at /usr/src/rustc-1.91.1/library/std/src/panicking.rs:698:5
283s    1: core::panicking::panic_fmt
283s              at /usr/src/rustc-1.91.1/library/core/src/panicking.rs:75:14
283s    2: core::panicking::assert_failed_inner
283s              at /usr/src/rustc-1.91.1/library/core/src/panicking.rs:439:17
283s    3: core::panicking::assert_failed
283s              at /usr/src/rustc-1.91.1/library/core/src/panicking.rs:394:5
283s    4: moka::future::cache::tests::ensure_gc_runs_when_dropping_cache::{{closure}}
283s              at ./src/future/cache.rs:5707:9
283s    5: <core::pin::Pin<P> as core::future::future::Future>::poll
283s              at /usr/src/rustc-1.91.1/library/core/src/future/future.rs:133:9
283s    6: <core::pin::Pin<P> as core::future::future::Future>::poll
283s              at /usr/src/rustc-1.91.1/library/core/src/future/future.rs:133:9
283s    7: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:742:70
283s    8: tokio::task::coop::with_budget
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/task/coop/mod.rs:167:5
283s    9: tokio::task::coop::budget
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/task/coop/mod.rs:133:5
283s   10: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:742:25
283s   11: tokio::runtime::scheduler::current_thread::Context::enter
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:432:19
283s   12: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:741:44
283s   13: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:829:68
283s   14: tokio::runtime::context::scoped::Scoped<T>::set
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/context/scoped.rs:40:9
283s   15: tokio::runtime::context::set_scheduler::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/context.rs:176:38
283s   16: std::thread::local::LocalKey<T>::try_with
283s              at /usr/src/rustc-1.91.1/library/std/src/thread/local.rs:315:12
283s   17: std::thread::local::LocalKey<T>::with
283s              at /usr/src/rustc-1.91.1/library/std/src/thread/local.rs:279:20
283s   18: tokio::runtime::context::set_scheduler
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/context.rs:176:17
283s   19: tokio::runtime::scheduler::current_thread::CoreGuard::enter
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:829:27
283s   20: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:729:24
283s   21: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:200:33
283s   22: tokio::runtime::context::runtime::enter_runtime
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/context/runtime.rs:65:16
283s   23: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/scheduler/current_thread/mod.rs:188:9
283s   24: tokio::runtime::runtime::Runtime::block_on_inner
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/runtime.rs:368:52
283s   25: tokio::runtime::runtime::Runtime::block_on
283s              at /usr/share/cargo/registry/tokio-1.48.0/src/runtime/runtime.rs:342:18
283s   26: moka::future::cache::tests::ensure_gc_runs_when_dropping_cache
283s              at ./src/future/cache.rs:5707:47
283s   27: moka::future::cache::tests::ensure_gc_runs_when_dropping_cache::{{closure}}
283s              at ./src/future/cache.rs:5700:50
283s   28: core::ops::function::FnOnce::call_once
283s              at /usr/src/rustc-1.91.1/library/core/src/ops/function.rs:250:5
283s   29: core::ops::function::FnOnce::call_once
283s              at /usr/src/rustc-1.91.1/library/core/src/ops/function.rs:250:5
283s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
283s 
283s 
283s failures:
283s     future::cache::tests::ensure_gc_runs_when_dropping_cache

I can't seem to reproduce this locally, but my local machine is quite different from the build server, so hard to point to exactly the issue could be.

Full build log output here: https://ci.debian.net/packages/r/rust-moka/testing/amd64/69085723/

Metadata

Metadata

Assignees

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