[0.14.13] [Oxyd] Mod limit causes inability to connect.

This subforum contains all the issues which we already resolved.
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

[0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Lennartos »

After playing some multi player games with several different players i found out that some players have a hard limit of 50 mods.
For these mods only amount matters not content or size, nor does it matter if they are zipped or not - took us some hours to find out what the cause was
If you exceed this limit by adding even 1 more mod, then suddenly no one can connect to these players if they host - and they cannot join anyone.

Message is always:
"Couldnt establish network communication with server."

However others can have 90 mods just fine, with no issues.
I cannot say what the cause is, but its very easy to reproduce.
With a headless server he joins the game according to log, but is kicked immediately from his perspective ( with a timer showing a delayed kick from others )
Attached is the log from the server.
Attachments
factorio-current.log
(41.24 KiB) Downloaded 218 times
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [14.12] Mod limit causes inability to connect.

Post by Oxyd »

Post the log from one of the limited clients, please.
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [14.12] Mod limit causes inability to connect.

Post by Lennartos »

Hereby Attached Logs for a 50 Mod game (server and client CAN connect).. and a 51 mod game (which fails)
Attachments
Client51Mods.log
(12.04 KiB) Downloaded 219 times
Client50Mods.log
(15.45 KiB) Downloaded 193 times
Server51Mods.log
(14.75 KiB) Downloaded 184 times
Server50Mods.log
(16.49 KiB) Downloaded 192 times
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [14.12] Mod limit causes inability to connect.

Post by kovarex »

This might be related to maximum packet size/packet fragmentation problems on certain network connections.
It might be, that the ConnectionAcceptOrDeny network message that contains the list of the mod with names might gets too large and the 50 is just a coincidence.

I might make the packet somewhat smaller to see if it changes the limit in the next version. (The 0.14.13 is alrady being released, so it will have to wait for 0.14.14)
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [14.12] Mod limit causes inability to connect.

Post by Lennartos »

Yeah. we where thinking the same - but we cant be sure since we dont know whats actually happening behind the scenes.
A good test might be to use base64 on the modlist if its currently clear text, and see if that affects it much.
If it does, and "UDP only" is kept, then adding automatic split of messages ( fragmentation ) would be a good addition to the networking layer.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [14.12] Mod limit causes inability to connect.

Post by kovarex »

Messages can be quite long, and it should be fragmented automatically, it might be specifics of some network that causes this problem.

Anyway, lets see what will change in 0.14.14
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [0.14.13] [kovarex] Mod limit causes inability to connect.

Post by Lennartos »

been tracking deeper into this, and behold - its apparently due to fragmentation being disabled by their ISP. ( which means its actually a larger problem than just a few people )
According to my tests, the usual packet size limit of modern routers is 1472 bytes.

But those affected by that setting i found that there is a 100% packet loss between 1465 and 1472 both OUT and IN. ( fits with PPPoE taking these 8 byte )
Packets larger than 1473 are fragmented on the external side and thus work fine ( as long as each chunk is < 1465 bytes )
But from inside they cannot reach anyone with packet sizes > 1465 bytes.

The only solution i can see is thus to automatically split the packages yourself into lets say 1024 or 1280 Byte chunks (since ipv6 guarantees only 1280, and also has no fragmentation support ), and assemble on the other end - since IP-fragmentation apparently is not a guaranteed feature in real life, and on the way out anyway with Ipv6.

From wiki:
"In IPv4, hosts must make a best-effort attempt to reassemble fragmented IP datagrams with a total reassembled size of up to 576 bytes. They may also attempt to reassemble fragmented IP datagrams larger than 576 bytes, but they are also permitted to silently discard such larger datagrams. Applications are recommended to refrain from sending datagrams larger than 576 bytes unless they have prior knowledge that the remote host is capable of accepting or reassembling them"
White-Tiger
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Oct 01, 2016 11:01 am
Contact:

Re: [0.14.13] [kovarex] Mod limit causes inability to connect.

Post by White-Tiger »

Lennartos wrote:[...] (since ipv6 guarantees only 1280, and also has no fragmentation support ) [...]
Just to clarify some things so others might not get the wrong idea...
IPv6 guarantees that the MTU is at least 1280 (IPv4 supported at least 68.... yep that's right.. 68 but with a minimum datagram size of 576) and also supports fragmentation but nothing automatically done by hops...
Though if a software isn't using MTU discovery, it should not exceed 1280 octets per packet / fragment
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.13] [kovarex] Mod limit causes inability to connect.

Post by kovarex »

Lennartos wrote:been tracking deeper into this, and behold - its apparently due to fragmentation being disabled by their ISP. ( which means its actually a larger problem than just a few people )
According to my tests, the usual packet size limit of modern routers is 1472 bytes.

But those affected by that setting i found that there is a 100% packet loss between 1465 and 1472 both OUT and IN. ( fits with PPPoE taking these 8 byte )
Packets larger than 1473 are fragmented on the external side and thus work fine ( as long as each chunk is < 1465 bytes )
But from inside they cannot reach anyone with packet sizes > 1465 bytes.

The only solution i can see is thus to automatically split the packages yourself into lets say 1024 or 1280 Byte chunks (since ipv6 guarantees only 1280, and also has no fragmentation support ), and assemble on the other end - since IP-fragmentation apparently is not a guaranteed feature in real life, and on the way out anyway with Ipv6.

From wiki:
"In IPv4, hosts must make a best-effort attempt to reassemble fragmented IP datagrams with a total reassembled size of up to 576 bytes. They may also attempt to reassemble fragmented IP datagrams larger than 576 bytes, but they are also permitted to silently discard such larger datagrams. Applications are recommended to refrain from sending datagrams larger than 576 bytes unless they have prior knowledge that the remote host is capable of accepting or reassembling them"
You are most probably right. Did you try in the 0.14.14? The limit should be increased but it should still be there.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by kovarex »

So the task of automatic packet fragmentation on the application level has been assigned and it should be done in the 0.14 branch.
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Lennartos »

He didn't have time to test, but we did schedule a test for tonight.
bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by bk5115545 »

The packet fragmentation implementation might also fix this one and similar if it's implemented for the whole game instead of just the connection process.
viewtopic.php?f=47&t=34452
Rseding91
Factorio Staff
Factorio Staff
Posts: 14253
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Rseding91 »

bk5115545 wrote:The packet fragmentation implementation might also fix this one and similar if it's implemented for the whole game instead of just the connection process.
viewtopic.php?f=47&t=34452
Yes, that issue will be addressed as well.
If you want to get ahold of me I'm almost always on Discord.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Oxyd »

Fixed in 0.14.15.
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Lennartos »

With 14.14 the mod limit increased to 64 mods from 50, so definetly a improvement.
However we cannot continue our game as the bug also seems to appear during map transfer - making the game looping loading and syncing until timeout ( with messages of "server not responding" popping up constantly during transfer) - new game works fine
Lennartos
Inserter
Inserter
Posts: 24
Joined: Mon Jun 27, 2016 10:13 pm
Contact:

Re: [0.14.13] [Oxyd] Mod limit causes inability to connect.

Post by Lennartos »

After testing 14.15 the behavior definitely is improved.
Though he is now stuck in a desync loop.. error report here:
viewtopic.php?f=209&t=35164

Not sure if there is still a hole in fragmentation or something else.
Post Reply

Return to “Resolved Problems and Bugs”