Export to GitHub

iperf - issue #135

Crash on OS X when using IP address


Posted on Jan 18, 2014 by Happy Dog

What steps will reproduce the problem? 1. download http://stats.es.net/software/iperf-3.0.1.tar.gz 2. ./configure, make, sudo make install 3. iperf3 -s 4. iperf3 -c serverIP

What is the expected output? What do you see instead? I would expect to see the results of the test. What I see instead is:

Client: "iperf3: error - control socket has closed unexpectedly" Server: "Abort trap: 6" and it exits

At first I thought this only happens when I test between two machines. If I run the server and client on the same machine with localhost it works fine. However, I discovered it also happens when you use the machines IP address on the local machine or even 127...

for example: iperf3 -s

iperf3 -c localhost works fine

iperf3 -c 127.0.0.1 crashes

iperf3 -c 192.168.0.10 crashes

I tested both as root (sudo) and as a user.

What version of the product are you using? On what operating system? http://stats.es.net/software/iperf-3.0.1.tar.gz but it also happened with 3.0

both client and server are OS X 10.9.1 (mavericks)

Please provide any additional information below.

Comment #1

Posted on Jan 21, 2014 by Happy Dog

Specifying the server address by IPv4 (or IPv6 for that matter) numeric address works fine on my MacOS Mountain Lion (10.8.5) system...haven't tried on a MacOS Mavericks machine yet.

Comment #2

Posted on Jan 21, 2014 by Happy Dog

Recreated this problem on MacOS X 10.9.1.

The problem is in an invocation of strcpy(3) in the function mapped_v4_to_regular_v4. Basically the code uses strcpy(3) to copy overlapping memory ranges which, depending on which reference documentation is consulted, either is forbidden or produces undefined results. Apparently libc in MacOS X 10.9.x is fairly pedantic about this; it causes an abort.

We just need to do the copy differently.

Comment #3

Posted on Jan 21, 2014 by Happy Dog

Fixed in 793655ca8a83.

Candidate for a backport to a 3.0.x bugfix branch, when we get around to making one.

Comment #4

Posted on Jan 21, 2014 by Happy Dog

Belatedly take ownership of this.

Comment #5

Posted on May 6, 2014 by Quick Camel

Just wondering; I downloaded and made the master branch from https://github.com/esnet/iperf.git on 10.9.3 and I still get this issue.

I see the commit back in January and my src/iperf_api.c matches your changes but I still get an Abort trap:6 whenever I try to connect a client built in a identical way on another 10.9.2 machine.

Status: Fixed

Labels:
Type-Defect Priority-Medium