Skip to content

Process_events_multithreaded is flaky #2385

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

Closed
TheBlueMatt opened this issue Jun 30, 2023 · 0 comments · Fixed by #3254
Closed

Process_events_multithreaded is flaky #2385

TheBlueMatt opened this issue Jun 30, 2023 · 0 comments · Fixed by #3254

Comments

@TheBlueMatt
Copy link
Collaborator

CI on latest main said:


failures:

---- ln::peer_handler::tests::test_process_events_multithreaded stdout ----
thread 'ln::peer_handler::tests::test_process_events_multithreaded' panicked at 'assertion failed: val <= 2', lightning/src/ln/peer_handler.rs:3153:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/dbf31f17d020475885f50fb7d5fc15ff239843d8/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/dbf31f17d020475885f50fb7d5fc15ff239843d8/library/core/src/panicking.rs:67:14
   2: core::panicking::panic
             at /rustc/dbf31f17d020475885f50fb7d5fc15ff239843d8/library/core/src/panicking.rs:117:5
   3: lightning::ln::peer_handler::tests::test_process_events_multithreaded
             at ./src/ln/peer_handler.rs:3153:4
   4: lightning::ln::peer_handler::tests::test_process_events_multithreaded::{{closure}}
             at ./src/ln/peer_handler.rs:3117:41
   5: core::ops::function::FnOnce::call_once
             at /rustc/dbf31f17d020475885f50fb7d5fc15ff239843d8/library/core/src/ops/function.rs:250:5
   6: core::ops::function::FnOnce::call_once
             at /rustc/dbf31f17d020475885f50fb7d5fc15ff239843d8/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    ln::peer_handler::tests::test_process_events_multithreaded

test result: FAILED. 723 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 22.38s
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 19, 2024
This test was added some time ago in
0c034e9, but never made any sense.
`PeerManager::process_events` will go around its loop as many times
is required to ensure we've always processed all events which were
pending prior to a `process_events` call, so having a test that
checks that we never go around more than twice is obviously broken.

And, indeed, in CI this tests fails with some regularity.

Instead, the test here is changed to ensure that we detectably go
around the loop again at least once.

Fixes lightningdevkit#2385
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 19, 2024
This test was added some time ago in
0c034e9, but never made any sense.
`PeerManager::process_events` will go around its loop as many times
is required to ensure we've always processed all events which were
pending prior to a `process_events` call, so having a test that
checks that we never go around more than twice is obviously broken.

And, indeed, in CI this tests fails with some regularity.

Instead, the test here is changed to ensure that we detectably go
around the loop again at least once.

Fixes lightningdevkit#2385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant