SFML community forums

Help => Network => Topic started by: Jungletoe on July 28, 2014, 04:50:35 am

Title: Ubuntu TCP networking dropping/freezing packets
Post by: Jungletoe 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?
Title: Re: Ubuntu TCP networking dropping/freezing packets
Post by: zsbzsb on July 28, 2014, 01:34:00 pm
The patch (https://github.com/SFML/SFML/pull/402/files) was independent of platform specific code, could you say how and when you installed SFML?
Title: Re: Ubuntu TCP networking dropping/freezing packets
Post by: Jungletoe on July 28, 2014, 05:49:51 pm
The patch (https://github.com/SFML/SFML/pull/402/files) was independent of platform specific code, could you say how and when you installed SFML?

Yesterday, we installed it through the Linux installation tutorial (http://www.sfml-dev.org/tutorials/2.1/start-linux.php) 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
Title: Re: Ubuntu TCP networking dropping/freezing packets
Post by: Jungletoe 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?
Title: Re: Ubuntu TCP networking dropping/freezing packets
Post by: binary1248 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.
Title: Re: Ubuntu TCP networking dropping/freezing packets
Post by: binary1248 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.