sudonym1 / iperf

Automatically exported from code.google.com/p/iperf
Other
0 stars 0 forks source link

Crash on OS X when using IP address #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by gfaid...@gmail.com on 18 Jan 2014 at 4:28

GoogleCodeExporter commented 9 years ago
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.

Original comment by bmah@es.net on 21 Jan 2014 at 5:05

GoogleCodeExporter commented 9 years ago
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.

Original comment by bmah@es.net on 21 Jan 2014 at 8:52

GoogleCodeExporter commented 9 years ago
Fixed in 793655ca8a83.

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

Original comment by bmah@es.net on 21 Jan 2014 at 9:01

GoogleCodeExporter commented 9 years ago
Belatedly take ownership of this.

Original comment by bmah@es.net on 21 Jan 2014 at 9:03

GoogleCodeExporter commented 9 years ago
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.

Original comment by h...@downrighttech.com on 6 May 2014 at 9:39