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

Update leaky_bucket version - current version have issues #163

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

izderadicka
Copy link
Contributor

Version 1.0 has some race condition, it sometimes panics (when new torrent is added - see below), version 1.1 seems to be stable for now (also there is crate leaky_bucket_light as alternative, if problems remains).

thread 'tokio-runtime-worker' panicked at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/leaky-bucket-1.0.1/src/linked_list.rs:385:13:
assertion `left == right` failed
  left: Some(0x7eac7402bef0)
 right: Some(0x7eac10051cb0)
stack backtrace:
   0: rust_begin_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:72:14
   2: core::panicking::assert_failed_inner
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:408:17
   3: core::panicking::assert_failed
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:363:5
   4: leaky_bucket::linked_list::LinkedList<T>::remove
             at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/leaky-bucket-1.0.1/src/linked_list.rs:385:13
   5: leaky_bucket::AcquireState::release_remaining
             at /home/ivan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/leaky-bucket-1.0.1/src/lib.rs:923:13
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped)

@ikatson
Copy link
Owner

ikatson commented Aug 3, 2024

Oh wow, never saw this bug! Thanks for the fix

@ikatson ikatson merged commit d1772d2 into ikatson:main Aug 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants