Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ubuntu TCP networking dropping/freezing packets  (Read 3590 times)

0 Members and 1 Guest are viewing this topic.

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Ubuntu TCP networking dropping/freezing packets
« on: July 28, 2014, 04:50:35 am »
About a year ago I had this exact same issue on Windows and we came to a resolution.
http://en.sfml-dev.org/forums/index.php?topic=11780.0

Now that I've ported and compiled the server on Linux, the exact same issue resurfaced. The server sends the packets to the client perfectly UNTIL it hits a large packet (nothing over 1000 bytes, though). At that point, the client stalls because it keeps waiting for the server to send the rest of the packet (a la the TCP protocol). The server never does and keeps moving on. The server then does not send ANY MORE packets to the client because I think the connector is frozen (or at least I assume).

Was that fix that was posted only apply to Windows?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Ubuntu TCP networking dropping/freezing packets
« Reply #1 on: July 28, 2014, 01:34:00 pm »
The patch was independent of platform specific code, could you say how and when you installed SFML?
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: Ubuntu TCP networking dropping/freezing packets
« Reply #2 on: July 28, 2014, 05:49:51 pm »
The patch was independent of platform specific code, could you say how and when you installed SFML?

Yesterday, we installed it through the Linux installation tutorial using the terminal. We used the second installation option (not the one pulled from the repo). We downloaded the latest build on the website.

One thing I can say, however, is that the "freeze" happens a lot more constantly than it once did. If the packet is over 1KB it instantly freezes the connector.

EDIT:
Okay, I just tested it more. IT DOESN'T HAVE TO DO WITH THE SIZE OF THE PACKET. It has to do purely with the volume of the packets being sent. If I send a lot of packets at once, it will freeze exactly after the 14th every single time. These 14 packets are roughly .5KB
« Last Edit: July 28, 2014, 06:17:38 pm by Jungletoe »

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: Ubuntu TCP networking dropping/freezing packets
« Reply #3 on: July 29, 2014, 01:36:49 am »
Could this maybe be an issue with sending things from Ubuntu->Windows? After digging through all the SFML source, that's the only thing I can think of. How much testing has been done on SFML Ubuntu networking?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Ubuntu TCP networking dropping/freezing packets
« Reply #4 on: July 29, 2014, 02:16:14 am »
The interoperation between operating systems shouldn't really matter. Since SFML relies on the POSIX network API, there isn't even a platform specific implementation for most of the network related features. If I had to pick one, I would say that Linux has a better network stack than Windows, so the operating system really isn't the problem ;).

And... please... for future reference don't refer specifically to Ubuntu. It is just one of many distributions, and they all share the same networking code because it is part of the Linux kernel. It would be more correct to refer to Linux in general, like you already do for Windows (i.e. you don't say Windows 8 Enterprise or Windows 7 Ultimate), and wouldn't discount all the other great distributions.

As with the previous problem, it would be nice to have more information to work with. We have to figure out if this is something specific to the OS (very unlikely), SFML, your code, or even the underlying network. The best would be to provide packet dumps (e.g. with Wireshark) of both server and client in an isolated environment, and under controlled conditions (i.e. you can annotate a dump with the exact timestamps of events that occur in the client) so we can map the traffic to actions in the game.

I have used SFML networking in multiple scenarios before, and even ran many tests, both on Windows and Linux to determine the limits of SFML networking (not very scalable, but usable in casual contexts). I have never encountered something like this, even in high load situations.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Ubuntu TCP networking dropping/freezing packets
« Reply #5 on: August 13, 2014, 12:22:09 pm »
So... it's been 2 weeks. Any update on this? Or can we assume the issue has been resolved? I don't feel good when there are potential bugs that never get followed up upon.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything