This object is in archive! 

[1.191.105][DS] On server start, server decides to not start with mods

LordTylus shared this bug 5 years ago
Won't Fix

Hello there,

today I got something complicated to report. I already have talked to Inflex about it and he recommended me adding all my findings to this bugreport.

What happened + Backstory

Every now and then (approximately once per month) we notice all of our mods vanishing from our server on scheduled restart. We run a Torch Server mostly for concealment plugins to maintain our 64 slots without the simspeed breaking down. And we run a self written plugin on it that basically kills and restarts the server if the restart process takes longer than 120 seconds.


We assumed to be killing the server too early that it didnt manage to properly save.


However after just a few seconds the world is properly saved and starts to unload. Also after investigating the source code of Torch it doesnt seem to be related to them at first glance.

Our Analysis to the matter

So when it happened again yesterday I was basically on the root-server while it happened and was able to check a few things immediately. To my surprise the mods were still present in the save file (which btw is over a GB in size and therefore not Uploaded here). Also the servers logs (which are attached) revealed that at 20:04:00 when the server started back up the mods indeed were present and being updated.

20:04:03.3884 [DEBUG]  Keen: Error during mod dependencies query: NoConnection
20:04:03.3884 [DEBUG]  Keen:       MyWorkshop.GetItemsBlocking: getting 18 items
20:04:04.8455 [DEBUG]  Keen: Mod query successful
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 429053416, title = 'OKI Grand Weapons Bundle'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 514062285, title = 'BuildInfo (extra block&terminal info, air leak finder)'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 523925570, title = 'Skybox Stellar fields'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 525460808, title = 'Reavers (Updated Behavior)'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 642589539, title = 'Tiered Engine Super Pack'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 646796262, title = 'Easy Inventory (Obsolete)'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 657749341, title = 'Automatic Ore Pickup'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 758597413, title = 'Text HUD API'
20:04:04.8455 [INFO]   Keen:       Up to date mod: Id = 805678675, title = 'Tiered Thorium Reactors and Refinery'
20:04:08.0708 [INFO]   Keen: Workshop item with id 946724937 download finished. Result: k_EResultOK
20:04:08.0708 [DEBUG]  Keen: Mod download successful.
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 946724937, title = 'PassageIntersections'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 973526550, title = 'Air Traffic'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1135484957, title = 'Surface Occupation'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1359954841, title = 'Rotary Airlock'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1365616918, title = 'Defense Shields - v1.9(62)'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1400364273, title = 'NPC Programming Extender'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1521905890, title = 'Modular Encounters Spawner'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1713051166, title = 'Chillz Floor Pack'
20:04:08.0708 [INFO]   Keen:       Up to date mod: Id = 1728457223, title = 'SmartRotors: Solar'
20:04:08.0728 [INFO]   Keen:       Mod download time: 3.22 seconds
20:04:08.0728 [INFO]   Keen:    Downloading world mods - END
20:04:08.0728 [INFO]   Keen:    Loading session: C:\Games\Space Engineers\PVE Modded\Instance\Saves\Star System
20:04:10.4026 [DEBUG]  Keen:    GC Memory: 1,222,801,864 B
20:04:10.4026 [DEBUG]  Keen:    Process Memory: 1,687,461,888 B
20:04:10.4026 [INFO]   Keen:    Experimental mode: Yes
20:04:10.4026 [INFO]   Keen:    Experimental mode reason: ExperimentalMode, MaxPlayers, PhysicsIterations, SyncDistance, TotalPCU, EnableIngameScripts, StationVoxelSupport
20:04:11.3710 [DEBUG]  Keen:    MyScriptManager.LoadData() - START
20:04:11.3850 [DEBUG]  Keen:    MyScriptManager.LoadData() - END
20:04:11.3850 [DEBUG]  Keen:    MyDefinitionManager.LoadData() - START
20:04:11.3850 [DEBUG]  Keen:    MyDefinitionManager.LoadScenarios() - START
20:04:11.3850 [DEBUG]  Keen:       3432f18cf6a0ef7ea37b6605cc32d86ad11a39fd
20:04:11.4947 [DEBUG]  Keen:       Loading scenarios
20:04:11.4947 [DEBUG]  Keen:    MyDefinitionManager.LoadScenarios() - END
20:04:11.4947 [DEBUG]  Keen:       List of used mods (0) - START
20:04:11.4947 [DEBUG]  Keen:       List of used mods - END
As you can see here, Mod 946724937 as successfully been updated to the latest version.

However there are 2 other things that seem odd.

20:04:03.3884 [DEBUG]  Keen: Error during mod dependencies query: NoConnection
First of all at the very beginning the check for mod dependincies failed with a NoConnection error. Connection was clearly there as mods could be updated.

However with the summer sale going on at the moment, it wouldn't surprise me if steams servers were not always able to reply to requests.

So to summarize so far:

  • Mod Dependincy Download failed
  • Mods were present in safe file
  • Mods were checked for updates and even updated.


Now to the seconds odd thing.

20:04:11.4947 [DEBUG]  Keen:       List of used mods (0) - START
20:04:11.4947 [DEBUG]  Keen:       List of used mods - END
Even though mods were found and even updated, the server decided not to use them.

I would assume the server would not even intend to update the mods if they are not in the save and therefore, it confused me why it decides to not use any of them.

Our Conclusion

As stated before there should not be any scenario of a corrupt save file.

Our Assumption would be if checking mod dependencies fails that mods which are in need of dependencies cannot be seen as working by the server. So they are skipped.

However of all these mods only one needs a dependency that is not in our mods list. So we assume the server itself does not know what mods needs which dependencies. So to "make sure" everything is alright it just does not use any of the mods after updating them.

Which causes corruption of the world because modded blocks vanish without return and on next save, the mods also vanish from the save.

Our Expectation

If for whatever reasons mods cannot be loaded we would expect the server start to fail. I prefer to just try it again and in worst case have the server offline for a few hours than ending up with a corrupted world and a load of unhappy players as their expensive modded blocks are gone.

We were able to recover as we we have 24h of backups. And noticed it immediately, but in case we are not able to rollback immeately but in a few hours new players that join in the mean time will loose their builds.

With our 64 slots the server has a rate of new players joining throughout the day.


Inflex told me you have means to check if there is any code path causing the server to run without loading mods.

I hope you find something and can fix it.

Thank you and I wish you a nice Sunday

LordTylus

Replies (4)

photo
1

Hi, Do you have that broken save? If so pls add it to this ticket

photo
1

Hello, as written above I didnt save it due to its size. And I have just overwritten it with the latest autobackup at that time. So the save only broke after the mods were not loaded.

photo
1

To make it clear:


  • The server started up without mods
  • Was then stopped by me which caused it to create a new save (without mods) and move the previous one (the one the server started with) to backups
  • I restored the world from the backup folder by manually deleting the "broken" world and replacing it with the previous working one
  • And started the server again.

Every thing worked fine then.


Sadly I have no way of reproducing the issue in any way. If I were to I would probably try to inject some debug exceptions in the mod checks of the server

photo
1

Hello again,


tioday I had an other instance of the server starting up without mods.

12:04:45.1463 [DEBUG]  Keen: Error during mod dependencies query: NoConnection
12:04:45.1463 [DEBUG]  Keen:       MyWorkshop.GetItemsBlocking: getting 18 items
12:04:45.4007 [INFO]   Keen: Peer2Peer_SessionRequest 76561198366530722
12:04:45.8993 [DEBUG]  Keen: Mod query successful
12:04:45.8993 [INFO]   Keen:       Up to date mod: Id = 396679430, title = 'Concrete Tool - placing voxels in survival'
12:04:45.8993 [INFO]   Keen:       Up to date mod: Id = 403922024, title = 'Computer Monitor - LCD Screen'
12:04:45.8993 [INFO]   Keen:       Up to date mod: Id = 473571246, title = 'Aerodynamic Wings - blocks for planet atmosphere'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 523925570, title = 'Skybox Stellar fields'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 603906728, title = 'Light Block Improvements - easy control panel access'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 642589539, title = 'Tiered Engine Super Pack'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 758597413, title = 'Text HUD API'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 805678675, title = 'Tiered Thorium Reactors and Refinery'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 914369510, title = 'Corruption PvE Combat'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 946724937, title = 'PassageIntersections'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1135484957, title = 'Surface Occupation'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1359954841, title = 'Rotary Airlock'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1365616918, title = 'Defense Shields - v1.9(64)'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1400364273, title = 'NPC Programming Extender'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1521905890, title = 'Modular Encounters Spawner'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1632221158, title = 'Automatic Ore Pickup NoHUD'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1713051166, title = 'Chillz Floor Pack'
12:04:45.9052 [INFO]   Keen:       Up to date mod: Id = 1728457223, title = 'SmartRotors: Solar'
12:04:45.9052 [INFO]   Keen:       Mod download time: 0.00 seconds
12:04:45.9052 [INFO]   Keen:    Downloading world mods - END
12:04:45.9052 [INFO]   Keen:    Loading session: C:\Games\Space Engineers\PVE Modded\Instance\Saves\Star System
12:04:47.1589 [DEBUG]  Keen:    GC Memory: 224,182,488 B
12:04:47.1589 [DEBUG]  Keen:    Process Memory: 521,998,336 B
12:04:47.1589 [INFO]   Keen:    Experimental mode: Yes
12:04:47.1589 [INFO]   Keen:    Experimental mode reason: ExperimentalMode, MaxPlayers, PhysicsIterations, SyncDistance, TotalPCU, EnableIngameScripts, StationVoxelSupport
12:04:48.0545 [DEBUG]  Keen:    MyScriptManager.LoadData() - START
12:04:48.0744 [DEBUG]  Keen:    MyScriptManager.LoadData() - END
12:04:48.0785 [DEBUG]  Keen:    MyDefinitionManager.LoadData() - START
12:04:48.0785 [DEBUG]  Keen:    MyDefinitionManager.LoadScenarios() - START
12:04:48.0785 [DEBUG]  Keen:       3432f18cf6a0ef7ea37b6605cc32d86ad11a39fd
12:04:48.1901 [DEBUG]  Keen:       Loading scenarios
12:04:48.1901 [DEBUG]  Keen:    MyDefinitionManager.LoadScenarios() - END
12:04:48.1901 [DEBUG]  Keen:       List of used mods (0) - START
12:04:48.1901 [DEBUG]  Keen:       List of used mods - END
It seems clear to me that whenever the lmod dependincies cannot be checked due to a connection error to steam the server will start without mods.


Please fix


Happened on version1.193.021

photo
1

What more information is needed?

photo
1

Hello, LordTylus,

as this thread is rather old now, can I please first of all ask whether you are still experiencing it even nowadays (v198)? Does the behavior changed anyhow throughout the time? Are you still trying to run this server from time to time, or did you already start new one that is not suffering with this issue?

Thanks in advance for either confirming or disproving that it is still happening.

Please keep in mind that currently we have some issues with heavily modded servers as such.

Kind Regards

Keen Software House: QA Department

photo
1

Hello,

I have not seen this problem in the 198 update yet. However this DOES NOT mean it is fixed.

I have seen it in 197 for the last time. It often happens when Steam is under heavy load, which just might not have been the case so far, like when a sale starts. The amount of mods is irrelevant then 1 mod is basically enough.

As shown above in the logs you get a message that looks like:

20:04:03.3884 [DEBUG]  Keen: Error during mod dependencies query: NoConnection

It finds all mods (probably from the sandbox config) but since it cannot figure out dependencies it just decides to run without them.

You will understand, that I cannot just simulate this specific steam Connection error. Since I cannot just disconnect my Server from the internet (which makes me unable to connect to it in the remote location) and without internet it fails due to other problems anyway.

So this is probably something only someone with source code access might be able to simulate and reliably reproduce by manually simulating this "NoConnection" usecase.

This is beyond what I can provide you right now.

However Since this is a problem that occurs usually once every two months I would want the ticket to stay open until either it wont appear again for a long time, or someone that can simulate a steam connection problem with the sourcecode can verify its indeed fixed.


Just to clarify. I dont want the connection problems to be fixed. These can happen all the time due to various reasons. I would either want to start the server with the last known state of mods that are good, or not start a all. Players are always very upset when a mods randomly disappear which means that custom blocks would also disappear from the world. So unless I rollback the server several hours (in case I cannot fix it immediately) they cannot be restored.

photo
1

Hello, LordTylus,

thanks for the answer.

Yeah, I understand. So I won´t close it now.

Kind Regards

Keen Software House: QA Department

photo
1

Hello, Engineer!

Because there is no new comment from you, and we are unable to reproduce the issue on our own, I will close this thread now as outdated.

If you or any other player will experience this issue again, please make a new thread and provide all needed info there.

Thank you for understanding.

Kind Regards

Keen Software House: QA Department

Replies have been locked on this page!