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

SCTP test produces "iperf3: error - control socket has closed unexpectedly" #620

Open
jiachenjun opened this issue Jul 28, 2017 · 17 comments

Comments

@jiachenjun
Copy link

jiachenjun commented Jul 28, 2017

NOTE: The iperf3 issue tracker is for registering bugs, enhancement
requests, or submissions of code. It is not a means for asking
questions about building or using iperf3. Those are best directed
towards the iperf3 mailing list at [email protected] or
question sites such as Stack Overflow
(http://www.stackoverflow.com/). A list of frequently-asked questions
regarding iperf3 can be found at http://software.es.net/iperf/faq.html.

Context

  • Version of iperf3:
    iperf 3.1.7

  • Hardware:
    VM for linux 64bit kernel version 4.4.70

  • Operating system (and distribution, if any):
    LFS
    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.

  • Other relevant information (for example, non-default compilers,
    libraries, cross-compiling, etc.):

Please fill out one of the "Bug Report" or "Enhancement Request"
sections, as appropriate.

Bug Report

  • Expected Behavior
    iperf3 can send sctp traffic successfully.
  • Actual Behavior
# ./iperf3 -c 192.168.1.7 --sctp -R -b 300M
Connecting to host 192.168.1.7, port 5201
Reverse mode, remote host 192.168.1.7 is sending
[  4] local 192.168.1.3 port 60663 connected to 192.168.1.7 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  36.4 MBytes   306 Mbits/sec
**iperf3: error - control socket has closed unexpectedly**
  • Steps to Reproduce
    create sever in one VM with ./iperf3 -s 192.168.1.7
    start send traffic on another VM with ./iperf3 -c 192.168.1.7 --sctp
  • Possible Solution
    N/A
    Please submit patches or code changes as a pull request.

Enhancement Request

  • Current behavior

  • Desired behavior

  • Implementation notes

If submitting a proposed implementation of an enhancement request,
please use the pull request mechanism.

EDIT: Do some MarkDown for legibility. --bmah

@jiachenjun
Copy link
Author

jiachenjun commented Jul 28, 2017

I download iperf3.2 and try again, same issue still existed.

#./iperf3 -v
iperf 3.2 (cJSON 1.5.2)
Linux 4.4.70-pc64 #1 SMP Mon Jun 26 18:34:34 UTC 2017 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication
#./iperf3 -c 192.168.1.7 -p 10001 --sctp
Connecting to host 192.168.1.7, port 10001
[  5] local 192.168.1.3 port 59847 connected to 192.168.1.7 port 10001
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   200 MBytes  1.68 Gbits/sec
iperf3: error - unable to write to stream socket: Connection reset by peer

EDIT: MarkDown for legibility. --bmah

@bmah888
Copy link
Contributor

bmah888 commented Jul 31, 2017

I agree it shouldn't do that. Can you show server-side output as well?

@bmah888 bmah888 changed the title iperf3 issue:"iperf3: error - control socket has closed unexpectedly" SCTP test produces "iperf3: error - control socket has closed unexpectedly" Aug 1, 2017
@bmah888
Copy link
Contributor

bmah888 commented Oct 17, 2017

No feedback after 2.5 months, and I can't reproduce this with tip of master branch code running on CentOS 7. Closing for now, I can reopen this issue later if necessary.

@bmah888 bmah888 closed this as completed Oct 17, 2017
@bogemon
Copy link

bogemon commented May 1, 2018

hi. I am testing this on 3G with udp - packet length 1448B for a 30 second interval. using iperf 3.5 unable to go beyond 28 seconds.

pushing 3 Mbps upstream towards a server

Server output comes as " iperf3 : error - select failed : Bad file descripter.

@bogemon
Copy link

bogemon commented May 1, 2018

Hi All

I have figured out that iperf 3.5 fixes this. I actually had iperf 3.4 there. issue is resolved in iperf 3.5

@Shrutihegde13
Copy link

Hi All,

How to install iperf 3.5 in linux?

@jiachenjun
Copy link
Author

jiachenjun commented Nov 5, 2018 via email

@Shrutihegde13
Copy link

Thanks a lot

@nolange
Copy link

nolange commented Jul 18, 2019

I get this issue on debian buster x64 with the distribution's version of iperf3.

Client:

# iperf3  --sctp -b 10m -c 10.99.11.1
Connecting to host 10.99.11.1, port 5201
[  5] local 10.99.37.240 port 42749 connected to 10.99.11.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.25 MBytes  10.5 Mbits/sec                  
[  5]   1.00-2.00   sec  1.19 MBytes  9.96 Mbits/sec                  
iperf3: error - control socket has closed unexpectedly

Server:

# /usr/bin/iperf3 -s -d
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
get_parameters:
{
	"sctp":	true,
	"omit":	0,
	"time":	10,
	"parallel":	1,
	"len":	65536,
	"bandwidth":	10000000,
	"pacing_timer":	1000,
	"client_version":	"3.6"
}
Accepted connection from 10.99.37.240, port 33444
[  5] local 10.99.11.1 port 5201 connected to 10.99.37.240 port 33351
interval_len 1.000110 bytes_transferred 1245184
interval forces keep
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  1.19 MBytes  9.96 Mbits/sec                  
iperf3: error - unable to read from stream socket: Bad file descriptor
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Version output:

# /usr/bin/iperf3 --version
iperf 3.6 (cJSON 1.5.2)
Linux desbuild 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication

@nolange
Copy link

nolange commented Jul 18, 2019

problem persists with iperf3 3.7 built from source

@hb3b
Copy link

hb3b commented Jul 25, 2019

Seeing this intermittently on:

iperf 3.6 (cJSON 1.5.2)
Linux 3efa7a0b256a 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64
Optional features available: CPU affinity setting, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing

@DL6ER
Copy link

DL6ER commented Dec 20, 2020

I'm affected by this as well, please reopen this issue ticket if there isn't a more suitable one. @bmah888

$ iperf3 -c 192.168.2.1 -p 4711
iperf3: error - control socket has closed unexpectedly

The issue happens immediately, it doesn't seem like there is any data transferred at all.

$ iperf3 -c 192.168.2.1 -p 4711 -n 100M -v
iperf 3.7 (cJSON 1.5.2)
Linux ThinkPad-X1 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication

@bmah888
Copy link
Contributor

bmah888 commented Dec 21, 2020

I'm still not able to reproduce this issue, but I believe y'all. Reopening.

@bmah888 bmah888 reopened this Dec 21, 2020
@bmah888
Copy link
Contributor

bmah888 commented Dec 21, 2020

Is it possible that those of you with this problem are having some firewall-related issue? That's a fairly common issue with iperf3 in general.

@DL6ER
Copy link

DL6ER commented Dec 31, 2020

Thanks for your reply. This is happening inside my local network at home where I have no firewall restrictions at all in place. Is there any way I could give you more information like by adding a very verbose debugging mode? Also, is it possible to query the version of the distant iperf3 server over the wire? I'm experimenting with two Ubuntu servers running iperf3 and there the issue happens only rarely. However, when using my router as server (which has an iperf3 server builtin as well, according to the docs), I always get this message very early on or even before the transfer starts at all.

@bmah888
Copy link
Contributor

bmah888 commented Jan 4, 2021

Thanks for your reply. This is happening inside my local network at home where I have no firewall restrictions at all in place. Is there any way I could give you more information like by adding a very verbose debugging mode? Also, is it possible to query the version of the distant iperf3 server over the wire? I'm experimenting with two Ubuntu servers running iperf3 and there the issue happens only rarely. However, when using my router as server (which has an iperf3 server builtin as well, according to the docs), I always get this message very early on or even before the transfer starts at all.

Well, "firewall" could also mean a host-based firewall like iptables or firewalld. But it looks like if you're doing this between two Ubuntu servers and you get the issue some of the time but not always, that doesn't really indicate a firewall/packet filtering issue.

There's a --debug flag in iperf3. If you can run that on the iperf3 server side that might help us a bit. I wonder if having a packet trace (such as from tcpdump) might be helpful.

The server knows the version of the client but not vice versa.

This is a bit of a mystery to me because I have absolutely no idea what's going wrong.

Er, wait a second @DL6ER . Are you trying this with SCTP (as per the original bug report) or is this with TCP (which is what your command lines indicate)?

@kar6s
Copy link

kar6s commented May 1, 2021

I have an observation. I'm using v3.1.3, but this is also repeatable using 3.2 and 3.7.
Using the -A option is breaking iperf and resulting in "control socket has closed unexpectedly". Removing the -A option fixes it.

#iperf3 -c 192.168.1.19 -p 5010 -A 1,3
Connecting to host 192.168.1.19, port 5010
[ 4] local 192.168.1.9 port 54258 connected to 192.168.1.19 port 5010
iperf3: error - control socket has closed unexpectedly

iperf3 -c 192.168.1.19 -p 5010

Connecting to host 192.168.1.19, port 5010
[ 4] local 192.168.1.9 port 54262 connected to 192.168.1.19 port 5010
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 19.0 MBytes 159 Mbits/sec 0 423 KBytes
[ 4] 1.00-2.00 sec 20.1 MBytes 168 Mbits/sec 0 423 KBytes
[ 4] 2.00-3.00 sec 19.1 MBytes 160 Mbits/sec 0 427 KBytes
[ 4] 3.00-4.00 sec 20.6 MBytes 173 Mbits/sec 0 427 KBytes
[ 4] 4.00-5.00 sec 20.6 MBytes 173 Mbits/sec 0 427 KBytes
[ 4] 5.00-6.00 sec 20.9 MBytes 175 Mbits/sec 0 427 KBytes
[ 4] 6.00-7.00 sec 18.8 MBytes 158 Mbits/sec 0 427 KBytes
[ 4] 7.00-8.00 sec 21.0 MBytes 176 Mbits/sec 0 427 KBytes
[ 4] 8.00-9.00 sec 19.6 MBytes 165 Mbits/sec 0 427 KBytes
[ 4] 9.00-10.00 sec 19.6 MBytes 165 Mbits/sec 0 427 KBytes


[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 199 MBytes 167 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 197 MBytes 165 Mbits/sec receiver

iperf Done.

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

No branches or pull requests

8 participants