Iperf 2.2.1: -u, -P and -R issue
A means to measure network responsiveness and throughput
Brought to you by:
rjmcmahon
iperf -s -i 1 -f m -t 40 -u
iperf -c 192.168.0.211 -u -P 4 -R -i 1 -f m -t 30 -b 144.4M
Iperf client with -u, -P and -R flags combined results in this message printed for seemingly all but 1 thread:
recvmsg failed: Connection refused
On Android, but not MacOS, client output additionally ends with:
FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xb400007f2282f800)
Aborted
TCP with -P and -R seems fine. UDP with just -P seems fine
This seems to be added in version 2.1.3. It works in 2.1.1.
Here is a commit to show the transfer id with the rcvmsg warning.
Note: This comment is probably incorrect. The core issue is a race on the server side. These tests or versions may not as easily expose the race but it's likely still there even in 2.1.1. The best solution for now is to use port ranges.
Last edit: Robert McMahon 2024-05-02
Issue is that the server side Listener isn't ready for a subsequent client thread's first packet. The server is sending an ICMP connection refused (seen via wireshark.) We'll need a retry mechanism similar to the TCP connect retry.
A workaround is to use port ranges. This eliminates the race.