The iperf3 server hangs while printing the report
- Dominant language
- C
- Stars
- 8.8k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
# Context
I am using iperf3 in a product that tests the UDP data throughput of mobile networks.
Sometimes the iperf3 server hangs while printing the report, and all subsequent tests fail with the message
`iperf3: error - the server is busy running a test. Try again later.`
The only solution I have found is to kill and restart the iperf3 server.
* Version of iperf3: 3.16
* Hardware:
on the iperf client side: Samsung A52s
on the iperf server side: Server with Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
* Operating system:
on the iperf client side: Android 11
on the iperf server side: Ubuntu 22.04.4 LTS
# Bug Report
* Expected Behavior
The server should not hang
* Actual Behavior
The server sometimes hangs while printing the report, and all subsequent tests fail with the message
`iperf3: error - the server is busy running a test. Try again later.`
The issue is not systematic but occurs after several hours.
When the iperf3 server hangs:
- the last transfer was in reverse mode (server-to-client direction)
- the transfer was completed without errors on the client side
- the client has received the report from the server and printed it
- the server hangs while printing the report
The only solution I have found is to kill and restart the iperf3 server.
* Steps to Reproduce
Execute an iperf test (from client to server) and an iperf reverse test (from server to client) every 10 minutes.
The iperf3 server is started with the following command:
`iperf3 --server --interval 0 -p 5202 -1 `
Note that the "-1" option causes iperf3 to exit after one transfer, but a daemon restarts it after 2 seconds.
The iperf3 client command (on the Android phone) is:
`iperf3 --forceflush -c x.x.x.x -V -p 5202 -u -t 15 -i 5 -fK -4 -b 5000000 -l 1200 -P 4 -O 0`
(x.x.x.x is the IP address of the server)
I've attached the logs of iperf3 server executed with the `--debug=3` option:
**iperf3server_debug3_ok.log** reports the correct behaviour:
at timestamp 06:54:11 iperf3 prints the report and exits, according to the `-1` option
[iperf3server_debug3_ok.log](https://github.com/user-attachments/files/16282500/iperf3server_debug3_ok.log)
**iperf3server_debug3_blocked.log** reports the wrong behaviour:
at timestamp 06:42:15 iperf3 prints the report but it does not exit
at timestamp 06:52:23 iperf3 has been killed and it traces "iperf3: interrupt - the server has terminated"
[iperf3server_debug3_blocked.log](https://github.com/user-attachments/files/16282499/iperf3server_debug3_blocked.log)
Contributor guide
Assessment
This issue has not been assessed yet.