Fix rare failures in new_outbound_peer_connections_are_rate_limited test #2450
Labels
C-bug
Category: This is a bug
I-integration-fail
Continuous integration fails, including build and test failures
Description
In rare cases, the
new_outbound_peer_connections_are_rate_limited
proptest fails:https://github.com/ZcashFoundation/zebra/runs/3003578821#step:10:1734
Fixing this bug is a low priority, unless it occurs much more frequently.
Steps to Reproduce
It is unclear why the test fails, because the assertions don't log the candidate number, or the times of the previous candidates.
There is no proptest seed, because the test uses
assert!
, rather thanprop_assert!
(#2271). But there are no times in the generated test case, so this failure might not be reproducible.It's possible that this failure is caused by high CPU load on the test machine, or a non-monotonic system clock.
Windows 2021-07-07
Zebra Logs
https://github.com/ZcashFoundation/zebra/runs/3003578821#step:10:1734
https://github.com/ZcashFoundation/zebra/runs/3003578821#step:10:1835
Environment
Windows is known to be non-monotonic:
https://doc.rust-lang.org/src/std/time.rs.html#223
https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/library/std/src/sys/windows/time.rs#L44
And there is a margin of error for cross-thread time comparisons:
https://github.com/rust-lang/rust/blob/master/library/std/src/sys/windows/time.rs#L182
Zebra Version
Commit fdfa3cb
Linux 2021-07-13
Zebra Logs
https://github.com/ZcashFoundation/zebra/pull/2487/checks?check_run_id=3052141305#step:10:968
Environment
Rust assumes that most Linux distributions are monotonic.
Zebra Version
Commit 8dddda6 in PR #2487
The text was updated successfully, but these errors were encountered: