--bidir option randomly fails with "iperf3: error - unable to connect stream: No such file or directory" on Windows
- Dominant language
- C
- Stars
- 8.8k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
# Context
I'm using the --bidir feature of iperf3 to measure perform between multiple LAN devices on a variety of operating systems.
When using Windows as a client, the option works erratically, often display the message "iperf3: error - unable to connect stream: No such file or directory", but not every time.
* Version of iperf3: 3.10.3
* Hardware: AMD 5950X, 32GB, Aquantia AQN-107 NIC (client)
Server is a variety of Unix platforms. The one in this test was a Raspberry Pi with Realtek 2.5 Gbps USB NIC.
* Operating system (and distribution, if any): Windows 10 21H2 (client side) . Raspberry Pi 64-bit Bullseye OS (server side).
_Please note: iperf3 is supported on Linux, FreeBSD, and macOS.
Support may be provided on a best-effort basis to other UNIX-like
platforms. We cannot provide support for building and/or running
iperf3 on Windows, iOS, or Android._
I am aware support can't be provided for Windows, but I still think it's worth filing and tracking the issue here. I will attempt to fix the bug myself, if no one else does.
* Other relevant information (for example, non-default compilers,
libraries, cross-compiling, etc.):
I used cygwin for the build. It was a while back and I don't recall which compiler was used. I didn't succeed in building debug binaries, which is why there is no pull request attached.
# Bug Report
```
C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64 --bidir
Connecting to host pi64, port 5201
[ 5] local 2601:646:8801:9d00:650f:5df3:62b3:42da port 49943 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ 7] local 2601:646:8801:9d00:650f:5df3:62b3:42da port 49945 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ ID][Role] Interval Transfer Bitrate
[ 5][TX-C] 0.00-1.00 sec 249 MBytes 2.09 Gbits/sec
[ 7][RX-C] 0.00-1.00 sec 95.3 MBytes 800 Mbits/sec
[ 5][TX-C] 1.00-2.00 sec 231 MBytes 1.93 Gbits/sec
[ 7][RX-C] 1.00-2.00 sec 149 MBytes 1.25 Gbits/sec
[ 5][TX-C] 2.00-3.00 sec 152 MBytes 1.28 Gbits/sec
[ 7][RX-C] 2.00-3.00 sec 168 MBytes 1.41 Gbits/sec
[ 5][TX-C] 3.00-4.00 sec 202 MBytes 1.69 Gbits/sec
[ 7][RX-C] 3.00-4.00 sec 157 MBytes 1.32 Gbits/sec
[ 5][TX-C] 4.00-5.00 sec 227 MBytes 1.90 Gbits/sec
[ 7][RX-C] 4.00-5.00 sec 151 MBytes 1.27 Gbits/sec
[ 5][TX-C] 5.00-6.00 sec 180 MBytes 1.51 Gbits/sec
[ 7][RX-C] 5.00-6.00 sec 162 MBytes 1.36 Gbits/sec
[ 5][TX-C] 6.00-7.00 sec 161 MBytes 1.35 Gbits/sec
[ 7][RX-C] 6.00-7.00 sec 166 MBytes 1.39 Gbits/sec
[ 5][TX-C] 7.00-8.00 sec 219 MBytes 1.84 Gbits/sec
[ 7][RX-C] 7.00-8.00 sec 154 MBytes 1.29 Gbits/sec
[ 5][TX-C] 8.00-9.00 sec 228 MBytes 1.91 Gbits/sec
[ 7][RX-C] 8.00-9.00 sec 150 MBytes 1.26 Gbits/sec
[ 5][TX-C] 9.00-10.00 sec 163 MBytes 1.37 Gbits/sec
[ 7][RX-C] 9.00-10.00 sec 164 MBytes 1.38 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID][Role] Interval Transfer Bitrate Retr
[ 5][TX-C] 0.00-10.00 sec 1.96 GBytes 1.69 Gbits/sec sender
[ 5][TX-C] 0.00-10.01 sec 1.96 GBytes 1.68 Gbits/sec receiver
[ 7][RX-C] 0.00-10.00 sec 1.48 GBytes 1.27 Gbits/sec 0 sender
[ 7][RX-C] 0.00-10.01 sec 1.48 GBytes 1.27 Gbits/sec receiver
iperf Done.
C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64 --bidir
Connecting to host pi64, port 5201
iperf3: error - unable to connect stream: No such file or directory
C:\Users\Julien Pierre\Desktop\iperf3>
```
* Expected Behavior
The --bidir option should work reliably without error every time.
* Actual Behavior
The message "iperf3: error - unable to connect stream: No such file or directory" frequently appears when trying to use the --bidir option against a remote iperf3 3.10+ server.
* Steps to Reproduce
Build iperf3 on Windows.
Use the binary in client mode with the --bidir option to hit any remote iperf3 3.10+ server, ie.
`iperf3 -c --bidir`
Repeat this command several times until the error shows up. It is very frequent, more than half the time.
I have not seen this error when running my iperf3 binary as server on Windows, and hitting it it locally with the --bidir option.
In this case, the error never appears.
Contributor guide
Assessment
This issue has not been assessed yet.