-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Segfault during cleanup_server
for bidirectional or with parallel stream tests ended early
#1696
Comments
You can also get a similar crash on the client side here if you queue up a bunch of client side tests (i.e. |
Can you try ruining these tests using PR #1654 code? The issues may be related, so it seems to be worth testing whether the PR also fix this issue. (I am using WSL which does not support |
It does not. You can see your changes working correctly in test # 1 but it still segfaults in test # 2. ( I added an assert to show where it was failing)
|
Thanks for testing. The second test failed because the termination happened before all threads where created. I enhanced PR #1654 to also handle this case. Can you check if the PR now fully resolves the issue? |
I am not able to recreate the issue using the most recent changes in PR #1654. Seems fixed. |
Context
Version of iperf3: 3.16
Hardware: N/A
Operating system (and distribution, if any): 6.5.0-26-generic # 26~22.04.1-Ubuntu
Other relevant information (for example, non-default compilers,
libraries, cross-compiling, etc.): N/A
Bug Report
While doing some testing I would occasionally use the wrong iperf flags/parameters and would terminate the test early rather than waiting for it to run completely.
Expected Behavior: Terminating a test early causes the client and server to stop testing. The client cleans up and terminates. The server cleans up and prepares for next test.
Actual Behavior: Server segfaults during cleanup
Steps to Reproduce
tc qdisc add dev lo root netem delay 50ms
iperf3 -s
iperf3 -c 127.0.0.1 -t 10 -P 10
oriperf3 -c 127.0.0.1 -t 10 --bidir
for i in $(seq 100); do iperf3 -c 127.0.0.1 -t 10 -P 10; done
then repeatedly use ctrl-c to kill tests.Possible Solution
Adding an assert into the code here shows the root cause. Something like
assert(sp->thr != 0);
. This would indicate that a NULL values is being passed intopthread_cancel
. A possible solution would be a NULL check before attempting to cancel the thread.Other observations
I was not able to reproduce the issue using 3.15 as the server.
The text was updated successfully, but these errors were encountered: