Giter Club home page Giter Club logo

Comments (2)

BrynCooke avatar BrynCooke commented on June 25, 2024

I have been hitting this issue and am able to reproduce by running an integration test in a loop.

Looks like it is possibly related to this: metrics-rs/quanta#61

The stacktrace is as follows:

2022-05-10T11:16:52.903652Z ERROR integration_tests: panicked at 'attempt to add with overflow', /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/num/mod.rs:834:5


1: std::panicking::rust_panic_with_hook
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:586:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
   6: core::panicking::panic
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:48:5
   7: core::num::<impl u64>::next_power_of_two
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/num/uint_macros.rs:2188:13
   8: quanta::Calibration::adjust_cal_ratio
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/lib.rs:272:25
   9: quanta::Calibration::calibrate
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/lib.rs:226:13
  10: quanta::Clock::new::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/lib.rs:307:17
  11: once_cell::sync::OnceCell<T>::get_or_init::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:974:57
  12: once_cell::imp::OnceCell<T>::initialize::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:95:19
  13: once_cell::imp::initialize_inner
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:171:31
  14: once_cell::imp::OnceCell<T>::initialize
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:93:9
  15: once_cell::sync::OnceCell<T>::get_or_try_init
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:1014:13
  16: once_cell::sync::OnceCell<T>::get_or_init
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:974:19
  17: quanta::Clock::new
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/lib.rs:305:31
  18: core::ops::function::FnOnce::call_once
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:227:5
  19: once_cell::sync::OnceCell<T>::get_or_init::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:974:57
  20: once_cell::imp::OnceCell<T>::initialize::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:95:19
  21: once_cell::imp::initialize_inner
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:171:31
  22: once_cell::imp::OnceCell<T>::initialize
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/imp_std.rs:93:9
  23: once_cell::sync::OnceCell<T>::get_or_try_init
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:1014:13
  24: once_cell::sync::OnceCell<T>::get_or_init
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/once_cell-1.9.0/src/lib.rs:974:19
  25: quanta::get_now
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/lib.rs:532:9
  26: quanta::instant::Instant::now
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/quanta-0.9.3/src/instant.rs:25:9
  27: moka::common::time::Instant::now
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/common/time.rs:24:17
  28: moka::sync::base_cache::Inner<K,V,S>::current_time_from_expiration_clock
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/sync/base_cache.rs:760:13
  29: moka::sync::base_cache::BaseCache<K,V,S>::get_with_hash::{{closure}}
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/sync/base_cache.rs:170:23
  30: moka::cht::map::bucket_array_ref::BucketArrayRef<K,V,S>::get_key_value_and_then
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/cht/map/bucket_array_ref.rs:48:30
  31: moka::cht::segment::HashMap<K,V,S>::get_key_value_and_then
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/cht/segment.rs:306:9
  32: moka::sync::base_cache::Inner<K,V,S>::get_key_value_and_then
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/sync/base_cache.rs:630:9
  33: moka::sync::base_cache::BaseCache<K,V,S>::get_with_hash
             at /home/bryn/.asdf/installs/rust/1.60.0/registry/src/github.com-1ecc6299db9ec823/moka-0.8.2/src/sync/base_cache.rs:167:27
  34: moka::sync::cache::Cache<K,V,S>::get

The number of times needed to hit this is very low. Sometimes it happens within 10 invocations, sometimes 100.

from moka.

tatsuya6502 avatar tatsuya6502 commented on June 25, 2024

@BrynCooke — Thanks for reporting the issue. I opened a separate issue #119 to track the panics in Quanta.

from moka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.