a particular packet segfaults tcprewrite #99

Closed
rcaputo opened this Issue Jul 22, 2014 · 4 comments

Comments

Projects
None yet
2 participants

rcaputo commented Jul 22, 2014

Replays seem to run at max speed regardless which timer I use, now that abstime is not available.

I built 4.0.4 for OS X Mavericks, via homebrew. The build options can be reviewed at https://github.com/Homebrew/homebrew/blob/master/Library/Formula/tcpreplay.rb

I removed --timer=abstime from my scripts, per the deprecation.

My test pcap spans 30 minutes. tcpreplay replays it in 17 seconds. I tried other available --timer options, and none of them seemed to affect the replay rate.

fklassen added this to the 4.0.5 milestone Jul 22, 2014

Owner

fklassen commented Jul 22, 2014

Thanks Rocco. Will have a look at this for 4.0.5 release.

fklassen self-assigned this Jul 22, 2014

fklassen removed the 4.0.5 label Jul 27, 2014

Owner

fklassen commented Jul 27, 2014

I could not reproduce the bug on my Mavericks system. Maybe you can give me more info. I installed 4.0.4 via Homebrew and replayed a regular 16 packet ping capture, and it took the expected 7 seconds ...

fklassen@JLTM9:~$ sudo tcpreplay -i en0 ~/Documents/Captures/ping.pcap 
Actual: 16 packets (1568 bytes) sent in 7.00 seconds.
Rated: 222.6 Bps, 0.001 Mbps, 2.27 pps
Flows: 2 flows, 0.28 fps, 16 flow packets, 0 non-flow
Statistics for network device: en0
    Attempted packets:         16
    Successful packets:        16
    Failed packets:            0
    Truncated packets:         0
    Retried packets (ENOBUFS): 0
    Retried packets (EAGAIN):  0

Adding the '-t-' option to replay as fast as possible resulted in the expected 0.000086 seconds ...

fklassen@JLTM9:~$ sudo tcpreplay -i en0 -t ~/Documents/Captures/ping.pcap 
Actual: 16 packets (1568 bytes) sent in 0.000086 seconds.
Rated: 18232558.1 Bps, 145.86 Mbps, 186046.51 pps
Flows: 2 flows, 23255.81 fps, 16 flow packets, 0 non-flow
Statistics for network device: en0
    Attempted packets:         16
    Successful packets:        16
    Failed packets:            0
    Truncated packets:         0
    Retried packets (ENOBUFS): 0
    Retried packets (EAGAIN):  0

rcaputo commented Jul 30, 2014

I misdiagnosed the problem. I seem to have found a packet that segfaults tcprewrite. I incorrectly assumed the early end of my script was the replay running full tilt.

I'm not sure how to attach a single-packet pcap here, so I've temporarily made it available at http://thirdlobe.ddns.net/~troc/tmp/tcpreplay-github-bug-99.pcap

I rewrite it like so (the 1.1.1.1 and 11:11:11:11:11:11 could be anything, as far as I can tell):

% tcprewrite --dstipmap=0.0.0.0/0:1.1.1.1/32 --enet-dmac=11:11:11:11:11:11,11:11:11:11:11:11 --fixcsum --infile=tcpreplay-github-bug-99.pcap --outfile=/dev/null
zsh: segmentation fault tcprewrite --dstipmap=0.0.0.0/0:1.1.1.1/32 --fixcsum --outfile=/dev/null

rcaputo changed the title from no time regulation on Mavericks after abstime removed to a particular packet segfaults tcprewrite Jul 30, 2014

fklassen added the duplicate label Jul 30, 2014

Owner

fklassen commented Jul 30, 2014

Thanks for reporting this bug. It seems to be a duplicate of #83. This bug appears to have always been out there, but only recently has it been reported. I have it fixed in v4.0.5beta1. I tested it in 4.0.5beta2 which I hope to release later today.

fklassen closed this Jul 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment