Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 396171

Summary: net-misc/iperf-2.0.5 when using -i flag, interval calculated to be negative and spews output
Product: Gentoo Linux Reporter: Camden Lindsay <camden.lindsay+gentoo>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: normal CC: bkohler, camden.lindsay+gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: A longer head of the output from the problem

Description Camden Lindsay 2011-12-27 05:34:54 UTC
Created attachment 297055 [details]
A longer head of the output from the problem

Hello-
When trying to use the -t -i and -c flag together against an iperf 2.0.4 server, the 2.0.5 client fails horribly. It spews the following -- creating about a 15 MB file in just a couple of seconds.

See attached output.  Here is the head of it...

dylan@BigBox ~ $ head blah.txt
------------------------------------------------------------
Client connecting to 192.168.11.126, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.11.10 port 37395 connected with 192.168.11.126 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0--1324962909.3 sec  0.00 Bytes  -0.00 bits/sec
[  3] -1324962909.3--1324962899.3 sec  0.00 Bytes  0.00 bits/sec
[  3] -1324962899.3--1324962889.3 sec  0.00 Bytes  0.00 bits/sec
[  3] -1324962889.3--1324962879.3 sec  0.00 Bytes  0.00 bits/sec
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-27 19:59:34 UTC
Please post your `emerge --info' output too.
Comment 2 Camden Lindsay 2011-12-27 20:02:20 UTC
Portage 2.1.10.41 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 2.6.38-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r6-x86_64-Intel-R-_Core-TM-_i3_CPU_540_@_3.07GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 27 Dec 2011 10:00:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.4.6, 2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j4 --load-average 4"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.mcs.anl.gov/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl alsa amd64 apache2 berkdb bri bzip2 cli cracklib crypt css cups curl cxx diskio dri dvd encode fortran gd gdbm genericjb gnutls gpm h323 iconv ipv6 jpeg lm_sensors maildir mjpeg mmx modules mpeg mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl php png pppd readline samba sasl sendmail session snmp sockets speex sse sse2 ssl sysfs tcpd unicode ups x264 xml xorg zaptel zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Camden Lindsay 2011-12-27 20:03:33 UTC
Sorry, missed the emerge --info output -- now inline.
Thanks!
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-27 20:06:54 UTC
Also, what exact command did you issue on the client side? You mention optional parameters but not their arguments.
Comment 5 Camden Lindsay 2011-12-27 20:11:38 UTC
Ah, 
here is the command that a ran to capture the output (from my history).  Thought i put in initial bug but  it looks like not -- sorry again!

iperf -t 60 -i 10 -c 192.168.11.126  >blah.txt
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-27 20:20:34 UTC
(In reply to comment #5)
> Ah, 
> here is the command that a ran to capture the output (from my history). 
> Thought i put in initial bug but  it looks like not -- sorry again!
> 
> iperf -t 60 -i 10 -c 192.168.11.126  >blah.txt

I can't reproduce that. For a minute I assumed it was something to do with the client being amd64, but I get nice output like this (amd64 client):

------------------------------------------------------------
Client connecting to bastiaan, TCP port 5001
TCP window size: 40.6 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.124 port 47442 connected with 10.0.0.123 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   112 MBytes  94.2 Mbits/sec
[  3] 10.0-20.0 sec   112 MBytes  94.2 Mbits/sec
[  3] 20.0-30.0 sec   112 MBytes  94.2 Mbits/sec
[  3] 30.0-40.0 sec   112 MBytes  94.1 Mbits/sec
[  3] 40.0-50.0 sec   112 MBytes  94.1 Mbits/sec
[  3] 50.0-60.0 sec   112 MBytes  94.1 Mbits/sec
[  3]  0.0-60.0 sec   673 MBytes  94.1 Mbits/sec

and this (x86 client):
------------------------------------------------------------
Client connecting to bastiaan, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.152 port 39682 connected with 10.0.0.123 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   112 MBytes  94.1 Mbits/sec
[  3] 10.0-20.0 sec   112 MBytes  94.2 Mbits/sec
[  3] 20.0-30.0 sec   112 MBytes  94.0 Mbits/sec
[  3] 30.0-40.0 sec   112 MBytes  94.2 Mbits/sec
[  3] 40.0-50.0 sec   112 MBytes  94.1 Mbits/sec
[  3] 50.0-60.0 sec   112 MBytes  94.2 Mbits/sec
[  3]  0.0-60.0 sec   673 MBytes  94.1 Mbits/sec

Can you reproduce this with a 2.0.5 server? (Because that's what I used.)
Comment 7 Camden Lindsay 2011-12-27 21:01:05 UTC
Hmm interesting.

Ok, the server i was using was also x86_64
dylan@shibuntu:~$ uname -a
Linux shibuntu 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:07:13 UTC 2011 x86_64 GNU/Linux


Lets see what happens if i run it againstitself

Okay, yes it is reproduce-able.  

On the box that i posted emerge --info about, i have set up to run both server and client on same box.
Server output (note, the server side connection stats did not appear until the client side was cntrl-c'd.  Also note that the test ran for 44 seconds, but never summarized at 10 seconds as it should have with the client command):

dylan@BigBox ~ $ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.11.10 port 5001 connected with 192.168.11.10 port 48475
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-44.6 sec   128 KBytes  23.5 Kbits/sec


Client Command:
iperf -t 60 -i 10 -c 192.168.11.10 >blah.txt

Head of output:
dylan@BigBox ~ $ head blah.txt
------------------------------------------------------------
Client connecting to 192.168.11.10, TCP port 5001
TCP window size: 49.5 KByte (default)
------------------------------------------------------------
[  3] local 192.168.11.10 port 48475 connected with 192.168.11.10 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0--1325018845.8 sec  0.00 Bytes  -0.00 bits/sec
[  3] -1325018845.8--1325018835.8 sec  0.00 Bytes  0.00 bits/sec
[  3] -1325018835.8--1325018825.8 sec  0.00 Bytes  0.00 bits/sec
[  3] -1325018825.8--1325018815.8 sec  0.00 Bytes  0.00 bits/sec

Note: the 'blah.txt' output file grew to be 657 Megabytes in that 40 seconds:
dylan@BigBox ~ $ ls -lh blah.txt 
-rw-r--r-- 1 dylan admin 657M Dec 27 12:48 blah.txt
Comment 8 Camden Lindsay 2013-11-28 08:00:21 UTC
I just ran across this again; 
this time using a different server, same client

server is
[dylan@zenbook ~]$ uname -a && iperf -v
Linux zenbook 3.12.1-2-ARCH #1 SMP PREEMPT Tue Nov 26 18:20:34 PST 2013 x86_64 GNU/Linux
iperf version 2.0.5 (08 Jul 2010) pthreads


client is
dylan@BigBox ~ $ uname -a && iperf -v
Linux BigBox 3.8.13-gentoo #1 SMP Mon May 27 15:57:41 PDT 2013 x86_64 Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz GenuineIntel GNU/Linux
iperf version 2.0.5 (08 Jul 2010) single threaded


ouput is as such:
dylan@BigBox ~ $ iperf -t 2 -i 1 -c 192.168.11.220 >blah.txt
^Cdylan@BigBox ~ $ head blah.txt 
------------------------------------------------------------
Client connecting to 192.168.11.220, TCP port 5001
TCP window size: 22.5 KByte (default)
------------------------------------------------------------
[  3] local 192.168.11.10 port 35761 connected with 192.168.11.220 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0--1385623322.8 sec  0.00 Bytes  -0.00 bits/sec
[  3] -1385623322.8--1385623321.8 sec  0.00 Bytes  0.00 bits/sec
[  3] -1385623321.8--1385623320.8 sec  0.00 Bytes  0.00 bits/sec
[  3] -1385623320.8--1385623319.8 sec  0.00 Bytes  0.00 bits/sec



current emerge --info
dylan@BigBox ~ $ sudo emerge --info
Password: 
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.15-r3, 3.8.13-gentoo x86_64)
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-Intel-R-_Core-TM-_i3_CPU_540_@_3.07GHz-with-gentoo-2.2
KiB Mem:     8169084 total,    494236 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Wed, 27 Nov 2013 10:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.4.6, 2.7.5-r3, 3.2.5-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j4 --load-average 4"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.mcs.anl.gov/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/store/portage"
PORTDIR_OVERLAY=""
USE="X aac acl alsa amd64 apache2 berkdb bri bzip2 cli cracklib crypt css curl cxx diskio dri dvd encode fortran gd gdbm genericjb gnutls h323 iconv ipv6 jpeg lm_sensors maildir mjpeg mmx modules mpeg mudflap multilib mysql ncurses nls nptl openmp pam pcre perl php png readline samba sasl sendmail session snmp sockets speex sse sse2 ssl tcpd unicode ups x264 xml zaptel zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 9 Ben Kohler gentoo-dev 2017-08-17 16:45:09 UTC
Does this still affect the in-repo 2.0.9 version?
Comment 10 Camden Lindsay 2017-09-14 16:25:10 UTC
I can no longer reproduce with a mixture of 2.0.10 pthreads and 2.0.9 single threaded clients/servers
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2017-09-14 16:29:24 UTC
WORKSFORME means it wasn't a bug. Assumed FIXED, then.