( 12.22 ) Headless server crash.

This subforum contains all the issues which we already resolved.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

( 12.22 ) Headless server crash.

Post by NoPantsMcDance »

My vanilla server had a hard crash so I figured I'd post the log here as it's interesting looking. Posted the log to my server should be readable though. It's the best I can do with my cellphone. http://www.sugaming.us/downloads/factorio-current.log
Looking for a multiplayer server? Check out my servers Vanilla Server
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: ( 12.22 ) Headless server crash.

Post by kovarex »

This looks like a desync, I can't do anything until I get the desync report, or save and reproducible way how to cause it.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by NoPantsMcDance »

http://www.sugaming.us/downloads/desync.zip here is the desync report it's quite large. I'm not sure who was online before it crashed so idk what they were doing. I'll check and have them reply here to reproduce it if possible.

EDIT: This is the first hard crash on this server since I've been running it. Hopefully it's nothing serious and a one time thing.
Looking for a multiplayer server? Check out my servers Vanilla Server
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: ( 12.22 ) Headless server crash.

Post by kovarex »

NoPantsMcDance wrote:http://www.sugaming.us/downloads/desync.zip here is the desync report it's quite large. I'm not sure who was online before it crashed so idk what they were doing. I'll check and have them reply here to reproduce it if possible.

EDIT: This is the first hard crash on this server since I've been running it. Hopefully it's nothing serious and a one time thing.
We have made 2 fixes related to desync for 0.12.23, so lets see if it happens again in that version.

The 0.12.23 will be released in two days.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by NoPantsMcDance »

kovarex wrote:
NoPantsMcDance wrote:http://www.sugaming.us/downloads/desync.zip here is the desync report it's quite large. I'm not sure who was online before it crashed so idk what they were doing. I'll check and have them reply here to reproduce it if possible.

EDIT: This is the first hard crash on this server since I've been running it. Hopefully it's nothing serious and a one time thing.
We have made 2 fixes related to desync for 0.12.23, so lets see if it happens again in that version.

The 0.12.23 will be released in two days.
Sweet. Looking forward to the new version.
Looking for a multiplayer server? Check out my servers Vanilla Server
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: ( 12.24 ) Headless server crash.

Post by NoPantsMcDance »

Had another crash on my vanilla server. Included the log and desync report. If you need any other info lemme know.
Attachments
factorio-current.log
(742.67 KiB) Downloaded 181 times
Looking for a multiplayer server? Check out my servers Vanilla Server
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: ( 12.24 ) Headless server crash.

Post by kovarex »

NoPantsMcDance wrote:Had another crash on my vanilla server. Included the log and desync report. If you need any other info lemme know.
This looks, like someone is sending lot of packets not related to factorio to your ip.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: ( 12.24 ) Headless server crash.

Post by NoPantsMcDance »

kovarex wrote:
NoPantsMcDance wrote:Had another crash on my vanilla server. Included the log and desync report. If you need any other info lemme know.
This looks, like someone is sending lot of packets not related to factorio to your ip.
Why would that cause the server to crash?
Looking for a multiplayer server? Check out my servers Vanilla Server
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: ( 12.22 ) Headless server crash.

Post by kovarex »

Because we have just 2 bytes of authorization that the packet really relates to Factorio. Once it passes that, it is deserialised, and different kind of problems can happen.

In other words, sending random packets to Factorio port while the server is running can eventually lead to crash of the server.

I fixed the 1. frontier, that sending wrong action type will make the server ignore the packet instead of closing itself, but basically all the deserialization of packet data will have to be checked and sanitised. This is planned for 0.13

But anyway, the fact that you were receiving a lot of packets on the port that don't belong to Factorio is strange.
ofca
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Sat Feb 21, 2015 1:49 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by ofca »

I suggest banning source IP after 10 such packets/similar offenses -- otherwise headless servers will be useless now that you've opened the Internet's most famous kidiots storage (a.k.a. Steam)
Another quick idea is green-lighting correct IPs, and process only initial handshakes from other IPs.
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by cube »

This error was actually caused by something else than kovarex said. His fix will still help with the symptoms, though.
ofca wrote:I suggest banning source IP after 10 such packets/similar offenses -- otherwise headless servers will be useless now that you've opened the Internet's most famous kidiots storage (a.k.a. Steam)
Another quick idea is green-lighting correct IPs, and process only initial handshakes from other IPs.
This looks like good ideas and I'd like to have filters like that in 0.13.
NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by NoPantsMcDance »

Looks like someone read this post and decided to abuse it. You guys have a quick solution or should I just add a check in my script for x amount of connection requests to block the IP. What would be a safe number for the amount of failed connection requests so this doesn't affect legit players?
Attachments
factorio-current.log
(5.77 MiB) Downloaded 183 times
Looking for a multiplayer server? Check out my servers Vanilla Server
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: ( 12.22 ) Headless server crash.

Post by cube »

It took just three seconds ... we really need to work on this. And that IP is from Prague :-)

There is no quick solution for that on our side yet, sorry. For a safe attempt number I would say that 5 per minute and IP address is enough. Generally the first one should succeed (I don't think that I've seen any connection attempt to fail), but five should work even for weird connection problems and multiple people connecting from the same NATed address.

As I already said, we will be adding this kind of protection to 0.13. This is the bug report thread for it: 17720
Post Reply

Return to “Resolved Problems and Bugs”