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

Issue 751 #859

Closed
wants to merge 2 commits into from
Closed

Issue 751 #859

wants to merge 2 commits into from

Conversation

acooks
Copy link
Contributor

@acooks acooks commented Apr 19, 2019


This change is Reviewable

The TEST_END message is racing with the server_timer_proc timer.
When the RTT is higher than a second, the timer wins the race
and closes the control socket before the results are exchanged.

This results in the client reporting:
"error - control socket has closed unexpectedly"
as reported in GH issue 751.

This change doesn't prevent the race, but significantly increases the
grace period based on a maximum RTT of 4 seconds and accounts for
the ten transitions in the iperf3 state machine.
When the server receives IPERF_DONE, clean up and close the
control socket, instead of waiting for the test timer to expire.
@bmah888 bmah888 self-assigned this May 9, 2019
@bmah888 bmah888 added the bug label May 9, 2019
@bmah888
Copy link
Contributor

bmah888 commented May 9, 2019

Thanks for the PR! I hope to get around to studying the code change sometime soon...your description of the problem and solution make sense given the symptoms that have been reported.

Copy link
Contributor

@bmah888 bmah888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks useful, thanks. I might have made this something that was settable with a command-line parameter on the server (with a long default), and not bothering to derive the value from the rtt and number of state transitions. I'm not saying you need to change it for this pull request, I'm mostly just thinking "out loud".

Copy link
Contributor

@bmah888 bmah888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line actually doesn't do anything. The switch/case statement that this is all a part of, ensures that test->state is already set to IPERF_DONE.

bmah888 pushed a commit that referenced this pull request Jun 14, 2019
The TEST_END message is racing with the server_timer_proc timer.
When the RTT is higher than a second, the timer wins the race
and closes the control socket before the results are exchanged.

This results in the client reporting:
"error - control socket has closed unexpectedly"
as reported in GH issue 751.

This change doesn't prevent the race, but significantly increases the
grace period based on a maximum RTT of 4 seconds and accounts for
the ten transitions in the iperf3 state machine.

(cherry picked from commit 34bdddb)
(originally submitted by @acooks in #859)
@bmah888
Copy link
Contributor

bmah888 commented Jun 14, 2019

Because I'm trying to finish off some things, I've just gone ahead and cherry-picked the first of the two commits from this pull-request to the iperf3 master branch. Thanks for the pull-request!

@acooks
Copy link
Contributor Author

acooks commented Jun 14, 2019 via email

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

Successfully merging this pull request may close these issues.

2 participants