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

Intermittent failure in test_multi_join() #115

Open
tarka opened this issue Nov 12, 2023 · 1 comment
Open

Intermittent failure in test_multi_join() #115

tarka opened this issue Nov 12, 2023 · 1 comment

Comments

@tarka
Copy link

tarka commented Nov 12, 2023

The test test_multi_join() will intermittently fail, although it can take a large number of runs to see this. Running the following script:

#!/bin/bash
set -e

for i in `seq 5000`; do
    echo ==================== $i ====================
    cargo test -- multi_join;
done

will eventually produce the following error:

running 1 test
test test::test_multi_join ... FAILED

failures:

---- test::test_multi_join stdout ----
thread 'test::test_multi_join' panicked at src/lib.rs:1111:9:
assertion `left == right` failed
  left: Ok(0)
 right: Err(Empty)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test::test_multi_join

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 20 filtered out; finished in 0.00s

error: test failed, to rerun pass `--lib`
@tarka
Copy link
Author

tarka commented Nov 12, 2023

Test output with the debugging uncommented:

running 1 test
p0: 0
p0: 1
p0: 2
p0: 3
p0: 4
p0: 5
p0: 6
p0: 7
p1: 0 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(0)
p1: 1 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(1)
p1: 2 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(2)
p1: 3 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(3)
p1: 4 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: 5 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(4)
p1: send(5)
p1: 6 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: 7 -=- ThreadPool { name: Some("multi join pool0"), queued_count: 0, active_count: 0, max_count: 4 }
p1: send(6)
p1: send(7)
test test::test_multi_join ... FAILED

failures:

---- test::test_multi_join stdout ----
thread 'test::test_multi_join' panicked at src/lib.rs:1111:9:
assertion `left == right` failed
  left: Ok(0)
 right: Err(Empty)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    test::test_multi_join

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 20 filtered out; finished in 0.00s

error: test failed, to rerun pass `--lib`

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

No branches or pull requests

1 participant