crowbarmaster / BedrockManagementService

A multiple host, multiple server, Minecraft bedrock server management service and GUI manager.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service Randomly overwrote server world with new world, destroying data

coltonbyu opened this issue · comments

I am unsure as to the cause, but I can detail out what I know:

I installed the service on April 17, configured it and got it pointed to my existing world (which I used to use with the standard Bedrock server software).

I tested and was able to join the world correctly, the world was correct, level name correct (2020), server name correct (ColtonLandia), player states preserved.

A group of the common players from the server jumped on April 17, and April 18. No issues.

I joined momentarily on April 19, just to see if it was still running properly. No issues.

Without any further input, changes, etc from me, a player connected to the server on April 20. They found themselves at spawn in a new world, and reported it to me.

I joined and verified. I was in a new world with a spawn map. Going to my settings it shows the correct server name, so it did not appear to randomly stop using the selected server folder.

I went into my files on my host PC and copied the world and pasted it in:

%LocalAppData%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds

I opened the world locally, just to verify if the service was for some reason pulling from the wrong directory now, or hosting two servers. Opening locally I also see that the world was overwritten with a random new world. It still has the server name, level name and folder name set correctly, but its all been overwritten.

Looking at the server logs also suggest some very odd behavior, where the service was starting itself dozens of times per minute at some points, same when looking at the service logs. It claims to have been starting, updating, killing, and starting the server again multiple times per minute for hours, before apparently trying to open itself twice at once and hitting errors about the file already being accessed from another service, which would be itself.

ServerLog-20230418_07271573.log

ServiceLog-20230418_07271570.log


I will be moving away from the service for now until it is understood what caused this, I am happy to provide more logs or info.

If there is any chance to recover this lost world, that would be great. I have a backup from 4 days ago, but it is missing dozens of hours of work from various players

Hey there! Sorry about that. It appears something outside of BMS changed a bit, as your now 3rd case of this exact same issue happening. I have a new way of checking for updates that I am working on deploying into a new build, it should solve some issues, and make it far more dependable in the future. Give me some time and we will get you sorted out!

Unfortunately, due to the nature of this event and the way it failed, it allowed some bad behavior to happen. Hopefully someday soon I can find the time to work on shipping out what good stuff I've been working on lately.

Thank you for the update. I am just going to move to the standard ravetroll method for now, but once that is all ready I hope to come back and try again, with backups enabled this time

Hi @crowbarmaster - long time now since we last talked.

I came here to report that this Friday, BMS got stuck downloading the same 1.19.73.02 update... to the tune of 90GB of downloads in total... It stopped on its own 24 hours after it started, but rescheduled itself multiple times to run again. I only mention it here because you said you were looking at the update code. I wonder if that is causing the server memory leak (which I still get up to over 1GB of memory in use for BMS and have to restart the service (and BDS server)). My world didn't get overwritten like coltonbyu. I wonder if that's a side effect of memory or storage space resource issues, and Minecraft BDS being unable to cleanly save the world?

Sample from the 78MB (!!) log file...

4/21/2023 11:14:27 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:27 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:27 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:28 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:28 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:28 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:28 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:28 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:28 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:28 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:28 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:28 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:28 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:28 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:28 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:28 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:28 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:28 PM] Service: Checking latest BDS Version...
[4/21/2023 11:14:29 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:29 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:29 PM] Service: Latest version found: "1.19.73.02"
[4/21/2023 11:14:29 PM] Service: Automatic updates Enabled, will be checked at: 4/22/2023 2:00:00 AM.
[4/21/2023 11:14:29 PM] Service: Checking latest BDS Version...
...

That just repeats forever in the log. I am turning back off the check for updates. I only turned it on a few weeks ago to let BMS update the Minecraft version, and must have forgot to turn it back off. Even if that's off, I think there is still a memory leak somewhere.

Thank you for the update. I am just going to move to the standard ravetroll method for now, but once that is all ready I hope to come back and try again, with backups enabled this time

The backup feature to do a backup every so often only when players have been on is the best feature bar none. I have mine setup to backup every 30 minutes only when someone has been on the server and keep 50 backups… (it’s not a huge world).

Hello @tiamat2012 , good to hear from you again!

Some weird things have happened here, some explainable and others, well not so much. I had been working on a refactored updater system anyways, so I worked that in. I then fixed a sudden issue with the timers going rouge, possible runtime change maybe? End result is something that seems very stable.

I set a break point at a point in the updater routine where I could force a lower version as the latest as a test. It then downgraded to the version (Expected behavior there), and waited for the timer to elapse. It updates like it should now, and leaves only one timer behind. I will be pushing a build up shortly with these changes. Give it a go and let me know how things work!

New update pushed as latest release to address these issues. I will leave this open for a couple BDS versions to verify they work okay. Sorry for the breakage all!

@tiamat2012 Hey man, just wanted to check in - Did you see the hotfix build, and if so, did you notice the second one? Apologize for that... If you did happen to notice those earlier on, I wanted to ask you how things are working? Lol