1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Bug chunks reverted / unsaved #473

Discussion in 'Bugs & Feature Requests' started by Matt, Feb 1, 2013.

  1. I have a player that says all the work they did last night has been reverted to the original chunks. I manually restarted the server this morning, but there has been no crashes or other oddities. The server hasn't been under load and there's been no plugin changes in the last few days. I haven't heard of a problem like this since early spigot releases where chunks were unloaded before being saved to disk. I'm not sure how to verify or debug this... but i wanted to start a thread incase anyone else noticed a similar thing.
     
  2. Jigsaw

    Supporter

    Matt
    I had an issue similar this twice on build #430. However, I did get an error in the console. I can't remember the exact error, but it was something like "Failed to check session lock, aborting" followed by "Too many open files" which spammed a few thousand lines. It lasted for about 30 seconds and the server continued running after the error. I had two players who lost their player files (inventory, enderchest contents, last location, etc..) and the area they were building in was completely regenerated (all of their buildings gone). Luckily, I just loaded a backup I had and used WorldEdit to create a schematic file and paste back in the area that disappeared.

    I'm still not exactly sure what caused it and I have not seen it on any other build of Spigot. I am currently using build #469. I'm not exactly sure if it is something in Spigot or a plugin that is causing this. If you don't mind me asking, do you have mcmmo? If so, which build are you using? I read a post somewhere that a person claimed mcmmo caused this and updating it fixed the issue for him. If you don't have mcmmo, it might actually be a Spigot issue and a very serious one at that.
     
  3. I'm not using MCMMO and it wasn't file descriptor limit.. there was no crash as far as i can tell.. i just restarted with "stop" from console as usual.
     
  4. Puremin0rez

    Moderator

    I have also removed McMMO from my server. I'm pretty sure there is a file leak in the newer versions, I kept running out of PermGenSpace and too many file errors while running it. I removed it 2 days ago and not a problem since.

    Are you using the built in auto save feature or a plugin to accomplish saving Matt? Is it just that a /stop or /restart doesn't save chunks? That's quite an odd issue and it doesn't happen here for me.
     
  5. I have autosave set to 0. I never do "restart" or "reload", always "stop" then start fresh. There was 30-40 people on and nobody else had any issues. I don't know for sure it was the restart, but that's the only "event" that happened between him building the stuff last night and logging on this morning to see it all reverted to fresh chunks... quite odd...
     
  6. Jigsaw

    Supporter

    I haven't actually removed mcmmo, but I did update to a dev build (1263). I haven't noticed the issue since updating to Spigot #469 and updating mcmmo to #1263.
    Please don't take this as an insult. Are you sure there is nothing in the server.log? I would search for every occurrence of "severe" and see if anything has to do with chunk loading/unloading. It is really odd that no error would be logged if the chunk was reset.
     
  7. There's nothing in the logs during this time with SEVERE. LogBlock shows some blocks being broken in that area at 2013-02-01 02:01 .. but they are still there now with nothing being placed since. so something definitely registered a break in LogBlock but did not get saved to disk and did not throw up any errors.
     
  8. the chunk appears not to have regenerated but only "undone" the actions of last night as there are some blocks that were built there almost a month ago that are still there.. so it's only the breaking/placing from last night, that was logged in LogBlock, but has since been "undone". (It wasn't rolled back with logblock as there's no admins/staff on the server and no commands were run)
     
  9. Jigsaw

    Supporter

    If it isn't actually regenerating the chunk and it is only rolling it back that tells me it just didn't save properly. LogBlock isn't really concerned about whether the server actually saves the blocks correctly it is only recording the data and it assumes the chunk will be properly saved. That explains why LogBlock still shows that there were blocks placed that have "disappeared". I guess one recommendation I can make to prevent this is to run a "save-all" command at a set interval. Quite a few servers already do this (for example I do it every 15 minutes). It will make sure that the data is properly stored to disk and not in memory. That is really only a band-aid until the actual problem is discovered and addressed.
     
  10. I was under the impression that chunks are saved to disk when they are unloaded. "save-all" merely forces that action on all chunks and, regardless, a clean shutdown should save everything anyway.

    I did update dynmap to 1.4 a couple days ago and I noticed it's changelog mentioned some things about chunk loading. Maybe mikeprimm can confirm/deny that as a potential issue?

    Anyway, it's not a recurring or widespread problem yet, but i'll be sure to update here if anything new comes to mind or if it happens again.
     
  11. Jigsaw

    Supporter

    You are exactly right. The only reason that a "save-all" would help is that if the chunk was automatically saved every 15 minutes the worst case scenario is the chunk would get rolled back 15 minutes and not the entire night as it did in your case. It is, of course, not a solution to the problem, but it will prevent unnecessary loss for chunks that may not save properly. Just my advice.

    Good luck and I hope you figure it out as soon as possible.