-
Notifications
You must be signed in to change notification settings - Fork 43
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
fix: deadlock when sending ping #193
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,7 +210,7 @@ fn write_deadlock() { | |
// We make the message to transmit large enough s.t. the "server" | ||
// is forced to start writing (i.e. echoing) the bytes before | ||
// having read the entire payload. | ||
let msg = vec![1u8; 1024 * 1024]; | ||
let msg = vec![1u8; 100024 * 100024]; | ||
|
||
// We choose a "connection capacity" that is artificially below | ||
// the size of a receive window. If it were equal or greater, | ||
|
@@ -219,7 +219,7 @@ fn write_deadlock() { | |
// fact that the sum of receive windows of all open streams can easily | ||
// be larger than the send capacity of the connection at any point in time. | ||
// Using such a low capacity here therefore yields a more reproducible test. | ||
let capacity = 1024; | ||
let capacity = 10024; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those changes seem to make the test flaky and the deadlock happens sometimes. The test output when it happens is:
Would it also be possible to achieve the same using smaller numbers? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using let msg = vec![1u8; 30 * 1024 * 1024];
let capacity = 102;
pub const DEFAULT_CREDIT: u32 = 25600;
const PING_INTERVAL: Duration = Duration::from_millis(500); I can usually reproduce it at least once when running 5 times. But not when capacity is 100. Maybe it can give some idea about the cause. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can I override There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how would we benefit from changing those values? |
||
|
||
// Create a bounded channel representing the underlying "connection". | ||
// Each endpoint gets a name and a bounded capacity for its outbound | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we maintain the previous values?
I feel only Increasing the flakiness rate isn't much valuable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to merge those changes. Do you happen to know how to test this PR properly?