Tags:
create new tag
view all tags

2014-07-11 - FMNC Is Stylin' and Profilin'

To quote the inimitable Ric Flair, WOOOOO!

Finally, managed to figure out the quirky issues as to why the TCP connections on the server side were having issues crossing the finish line. As always, it was not just a simple fix but a few little issues which fit together to make things a wee bit more difficult to debug. On the plus side, the underlying code received a fair amount of robustness while debugging the wrong things. Future programmers tweaking the code will be highly appreciative I am hoping.

At the end, it boiled down to a few relatively minor things:

  • Make sure your memory is initialized: The primary issue was with the last segment that we were sending via TCP in that things would mostly work but the ACK would fail, i.e. the stack on the other side would ACK everything but the last bit. Very odd, things generally looked OK after a few explorations of captures via the Wireshark GUI. Well, after adapting things a bit for less packets to troubleshoot, I finally decided to recheck the checksums again (that had previously been OK). Upon more careful examination, the last packet had a bad TCP checksum. Triple checked the algorithm which was correct. However, the part that I had not checked was the zero padding. For the core sliced packets, things were just fine as those packets were the "biggest" packets in the bunch. For the last packet which represented the last chunk (less than how things were sliced), the overlap between the 32-bit boundaries was decidedly not zero. Sigh. Zero padding and voila, problem fixed.
  • HTML and ampersands do not play nice: The web page even when downloaded would always freeze on a particular line, rendering on some browsers but not others. Given the previous issue, I had largely written this off as being a quirk of the last packet issue. Of course, I ignored the fact that the occurred in the same place regardless of slice sizing (see an earlier post on this whole slicing business). Tweak the ampersand correctly which was reported with a line number after I fixed the prior TCP issue and poof, good to go.

With those two issues, a bit of dancing with the FIN / ACK sequence for a proper handshake and tada, things are all set.

You can even try it out here if you would like provided that the server is up and functional. Next week, the goal is to tweak things for reporting the actual sampled data (to the webpage) but that requires a healthy bit of finishing the TCP stack which is currently a bit lacking at the moment. The TCP pseudo-stack the server uses (if you can even call it that) needs the ability to avoid terminating the connection immediately after the test as well as an ability to send data without that is not being measured.

More in a post shortly showing a few intermediate results.

2014-07-11 - created by Aaron Striegel

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg Ric_flair_2014.jpg r1 manage 2730.0 K 2014-07-11 - 20:23 AaronStriegel Miguel Discart from Bruxelles, Belgique - 2014-04-04_20-10-07_NEX-6_DSC07535
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | More topic actions
Topic revision: r1 - 2014-07-11 - AaronStriegel
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback