WHY do chunks get corrupted? (especially at an excessive rate?)

Discussion in 'Bukkit Discussion' started by KingDingbat, Jan 24, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    KingDingbat

    Hi

    So, I've been maintaining a server for over a year, and while I'm not an expert, I'm not completely new either. But I have a problem I don't know how to fix.

    We recently opened a bukkit world and from almost the beginning we were seeing "Chunk is in the wrong location..." and "Entity is in the wrong location..." blah blah blah errors. It increased frequency over time, and now we're seeing lots of chunks that are regenerated all over the world.

    I didn't know what was causing it, and it didn't affect our city until last night. A couple of chunks have obviously regenerated.

    The problem is not that I can't fix them. I have backups and I can find TONS of info on how to restore/fix corrupt chunks. My question is WHAT CAUSES this to happen? Why do we have this problem in the first place? I have really have no clue what causes chunks to go corrupt, but I know data can go corrupt if it is not handled properly, and we've been having so many network issues and packet loss with our host, my first guess is that they're shitty and causing corruption? Is this possible?

    I'm really frustrated about this, because I really need to have a handle on why these chunk problems are happening.

    Thanks for your time!
    -KD
     
  2. Offline

    DoingItWell

    Plugins can sometimes cause these if they do unusual things. As an example, when horses were first introduced in Minecraft, plugins that tried to teleport horses the way you teleport players would often cause the "entity is in wrong location." So as a first step you might consider if it is caused by a plugin.

    I've seen this also pop up (although not in extreme case yet), with Enderman. I assumed someone probably went a little overboard with an Enderman farm in world_the_end. It also seem to be around the time of switching to 1.7.2 but I have no evidence that is related.

    I don't recall seeing the apparently more serious "chunk is in the wrong location" warning though. I've seen a chunk get corrupted after an admin used WorldEdit //regen that I had to restore from backup. But if happened to an area that wasn't modified by a plugin I'd be suspicious of a disk problem (or a situation like sudden shutdown in the middle of a save), etc.

    I'm interested too if others have suggestions.

    FYI: As an side, I know modified CraftBukkit is not supported but when I've encountered this I temporarily ran a version that automatically killed entities in wrong locations. I.e. Changed

    Code:java
    1.  
    2. // CraftBukkit start
    3. Bukkit.getLogger().warning("Wrong location for " + entity + " in world '" + world.getWorld().getName() + "'!");
    4.  


    to...

    Code:java
    1.  
    2. Bukkit.getLogger().warning(String.format("--- WRONG LOC --- %s @ chunk (%d,%d) vs (%d,%d)", entity.toString(), i, j, this.locX, this.locZ));
    3. entity.dead = true;
    4.  


    I honestly can't recommend that since I'm basically covering up the problem (killing the entity involved) instead of addressing the root cause. But helped to get things clean in my case.
     
Thread Status:
Not open for further replies.

Share This Page