Creeperface01 / Nukkit

Nukkit is a Nuclear-Powered Server Software For Minecraft: Pocket Edition
https://nukkit.io
GNU General Public License v3.0
15 stars 5 forks source link

major issue with chunks #35

Open PhanaticD opened 7 years ago

PhanaticD commented 7 years ago

I am using nukkit-gt1.2 build 53 from here: https://ci.potestas.xyz/job/Nukkit-GT1.2/changes

noticed my dedicated server was at full cpu usage: https://gyazo.com/7616952ed5d06da497ac9c6a4a5b8f8c

looked in logs this error was the last thing:

2017-10-14 22:19:17 [ERROR] Error while unloading a chunk: java.lang.RuntimeException: java.util.ConcurrentModificationException^M
2017-10-14 22:19:17 [ALERT] java.lang.RuntimeException: java.util.ConcurrentModificationException
    at cn.nukkit.level.format.anvil.Anvil.saveChunk(Anvil.java:279)
    at cn.nukkit.level.Level.unloadChunk(Level.java:2681)
    at cn.nukkit.level.Level.unloadChunk(Level.java:2641)
    at cn.nukkit.level.Level.unloadChunks(Level.java:2939)
    at cn.nukkit.level.Level.unloadChunks(Level.java:2917)
    at cn.nukkit.level.Level.doTick(Level.java:769)
    at cn.nukkit.Server.checkTickUpdates(Server.java:926)
    at cn.nukkit.Server.tick(Server.java:1001)
    at cn.nukkit.Server.tickProcessor(Server.java:799)
    at cn.nukkit.Server.start(Server.java:778)
    at cn.nukkit.Server.<init>(Server.java:469)
    at cn.nukkit.Nukkit.main(Nukkit.java:68)
Caused by: java.util.ConcurrentModificationException
    at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1211)
    at java.util.TreeMap$KeyIterator.next(TreeMap.java:1265)
    at cn.nukkit.level.Level.getPendingBlockUpdates(Level.java:1302)
    at cn.nukkit.level.Level.getPendingBlockUpdates(Level.java:1291)
    at cn.nukkit.level.format.anvil.Chunk.toBinary(Chunk.java:411)
    at cn.nukkit.level.format.anvil.RegionLoader.writeChunk(RegionLoader.java:143)
    at cn.nukkit.level.format.anvil.Anvil.saveChunk(Anvil.java:277)
    ... 11 more

I tried to run a jstack to get a thread dump

jstack -F 25519 > pocketjstack.txt
sun.jvm.hotspot.oops.UnknownOopException
        at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:263)
        at sun.jvm.hotspot.oops.NarrowOopField.getValue(NarrowOopField.java:44)
        at sun.jvm.hotspot.oops.OopUtilities.threadOopGetParkBlocker(OopUtilities.java:306)
        at sun.jvm.hotspot.runtime.JavaThread.getCurrentParkBlocker(JavaThread.java:389)
        at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
        at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
        at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
        at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
        at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
        at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
        at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
        at sun.tools.jstack.JStack.main(JStack.java:106)

here is that file: https://phanaticmc.com/stuff/pocketjstack.txt

I noticed FastAsyncWorldEdit is in there, so if this tag works: @boy0001 https://github.com/boy0001

PhanaticD commented 7 years ago
Thread 27173: (state = BLOCKED)
 - java.util.HashMap.newNode(int, java.lang.Object, java.lang.Object, java.util.HashMap$Node) @bci=0, line=1742 (Compiled frame)
 - java.util.HashMap.putVal(int, java.lang.Object, java.lang.Object, boolean, boolean) @bci=56, line=630 (Compiled frame)
 - java.util.HashMap.put(java.lang.Object, java.lang.Object) @bci=9, line=611 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.put(java.lang.String, cn.nukkit.nbt.tag.Tag) @bci=10, line=50 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.copy() @bci=64, line=225 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.copy() @bci=1, line=12 (Compiled frame)
 - cn.nukkit.nbt.tag.ListTag.copy() @bci=50, line=121 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.copy() @bci=61, line=225 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Chunk.toBinary() @bci=4, line=368 (Interpreted frame)
 - cn.nukkit.level.format.anvil.RegionLoader.writeChunk(cn.nukkit.level.format.FullChunk) @bci=8, line=143 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Anvil.saveChunk(int, int) @bci=25, line=277 (Interpreted frame)
 - cn.nukkit.level.Level.unloadChunk(int, int, boolean, boolean) @bci=232, line=2681 (Interpreted frame)
 - cn.nukkit.level.Level.unloadChunk(int, int, boolean) @bci=5, line=2641 (Interpreted frame)
 - cn.nukkit.level.Level.unloadChunks(boolean) @bci=132, line=2939 (Compiled frame)
 - cn.nukkit.level.Level.unloadChunks() @bci=2, line=2917 (Compiled frame)
 - cn.nukkit.level.Level.doTick(int) @bci=677, line=769 (Compiled frame)
 - cn.nukkit.Server.checkTickUpdates(int, long) @bci=136, line=927 (Compiled frame)
 - cn.nukkit.Server.tick() @bci=104, line=1002 (Compiled frame)
 - cn.nukkit.Server.tickProcessor() @bci=15, line=800 (Interpreted frame)
 - cn.nukkit.Server.start() @bci=151, line=779 (Interpreted frame)
 - cn.nukkit.Server.<init>(cn.nukkit.utils.MainLogger, java.lang.String, java.lang.String, java.lang.String) @bci=2880, line=470 (Interpreted frame)
 - cn.nukkit.Nukkit.main(java.lang.String[]) @bci=191, line=68 (Interpreted frame)

 "main" #1 prio=5 os_prio=0 tid=0x000070b9d0009800 nid=0x6fc7 runnable [0x000070b9d8f45000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.StringCoding.decode(StringCoding.java:229)
        at java.lang.String.<init>(String.java:463)
        at java.lang.String.<init>(String.java:515)
        at cn.nukkit.nbt.stream.NBTInputStream.readUTF(NBTInputStream.java:145)
        at cn.nukkit.nbt.tag.Tag.readNamedTag(Tag.java:84)
        at cn.nukkit.nbt.tag.CompoundTag.load(CompoundTag.java:35)
        at cn.nukkit.nbt.tag.ListTag.load(ListTag.java:45)
        at cn.nukkit.nbt.tag.Tag.readNamedTag(Tag.java:88)
        at cn.nukkit.nbt.tag.CompoundTag.load(CompoundTag.java:35)
        at cn.nukkit.nbt.tag.Tag.readNamedTag(Tag.java:88)
        at cn.nukkit.nbt.tag.CompoundTag.load(CompoundTag.java:35)
        at cn.nukkit.nbt.tag.Tag.readNamedTag(Tag.java:88)
        at cn.nukkit.nbt.NBTIO.read(NBTIO.java:84)
        at cn.nukkit.nbt.NBTIO.read(NBTIO.java:79)
        at cn.nukkit.level.format.anvil.Chunk.fromBinary(Chunk.java:251)
        at cn.nukkit.level.format.anvil.RegionLoader.unserializeChunk(RegionLoader.java:79)
        at cn.nukkit.level.format.anvil.RegionLoader.readChunk(RegionLoader.java:68)
        at cn.nukkit.level.format.anvil.Anvil.loadChunk(Anvil.java:239)
        at cn.nukkit.level.format.anvil.Anvil.getChunk(Anvil.java:317)
        at cn.nukkit.level.format.anvil.Anvil.getChunk(Anvil.java:26)
        at cn.nukkit.level.Level.loadChunk(Level.java:2576)
        at cn.nukkit.level.Level.getChunk(Level.java:2289)
        at cn.nukkit.level.Level.getChunk(Level.java:2282)
        at cn.nukkit.level.Level.getChunkEntities(Level.java:2186)
        at cn.nukkit.level.Level.getNearbyEntities(Level.java:2147)
        at cn.nukkit.entity.EntityLiving.entityBaseTick(EntityLiving.java:241)
        at cn.nukkit.entity.Entity.onUpdate(Entity.java:1197)
        at cn.nukkit.level.Level.doTick(Level.java:803)
        at cn.nukkit.Server.checkTickUpdates(Server.java:927)
        at cn.nukkit.Server.tick(Server.java:1002)
        at cn.nukkit.Server.tickProcessor(Server.java:800)
        at cn.nukkit.Server.start(Server.java:779)
        at cn.nukkit.Server.<init>(Server.java:470)

Thread 6397: (state = BLOCKED)
 - cn.nukkit.nbt.stream.NBTInputStream.readUTF() @bci=37, line=145 (Compiled frame)
 - cn.nukkit.nbt.tag.Tag.readNamedTag(cn.nukkit.nbt.stream.NBTInputStream) @bci=18, line=84 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.load(cn.nukkit.nbt.stream.NBTInputStream) @bci=10, line=35 (Compiled frame)
 - cn.nukkit.nbt.tag.ListTag.load(cn.nukkit.nbt.stream.NBTInputStream) @bci=44, line=45 (Compiled frame)
 - cn.nukkit.nbt.tag.Tag.readNamedTag(cn.nukkit.nbt.stream.NBTInputStream) @bci=30, line=88 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.load(cn.nukkit.nbt.stream.NBTInputStream) @bci=10, line=35 (Compiled frame)
 - cn.nukkit.nbt.tag.Tag.readNamedTag(cn.nukkit.nbt.stream.NBTInputStream) @bci=30, line=88 (Compiled frame)
 - cn.nukkit.nbt.tag.CompoundTag.load(cn.nukkit.nbt.stream.NBTInputStream) @bci=10, line=35 (Compiled frame)
 - cn.nukkit.nbt.tag.Tag.readNamedTag(cn.nukkit.nbt.stream.NBTInputStream) @bci=30, line=88 (Compiled frame)
 - cn.nukkit.nbt.NBTIO.read(java.io.InputStream, java.nio.ByteOrder, boolean) @bci=15, line=84 (Interpreted frame)
 - cn.nukkit.nbt.NBTIO.read(java.io.InputStream, java.nio.ByteOrder) @bci=3, line=79 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Chunk.fromBinary(byte[], cn.nukkit.level.format.LevelProvider) @bci=14, line=251 (Interpreted frame)
 - cn.nukkit.level.format.anvil.RegionLoader.unserializeChunk(byte[]) @bci=5, line=79 (Interpreted frame)
 - cn.nukkit.level.format.anvil.RegionLoader.readChunk(int, int) @bci=263, line=68 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Anvil.loadChunk(int, int, boolean) @bci=60, line=239 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Anvil.getChunk(int, int, boolean) @bci=46, line=317 (Interpreted frame)
 - cn.nukkit.level.format.anvil.Anvil.getChunk(int, int, boolean) @bci=4, line=26 (Interpreted frame)
 - cn.nukkit.level.Level.loadChunk(int, int, boolean) @bci=50, line=2576 (Interpreted frame)
 - cn.nukkit.level.Level.getChunk(int, int, boolean) @bci=43, line=2289 (Compiled frame)
 - cn.nukkit.level.Level.getChunk(int, int) @bci=4, line=2282 (Interpreted frame)
 - cn.nukkit.level.Level.getChunkEntities(int, int) @bci=3, line=2186 (Interpreted frame)
 - cn.nukkit.level.Level.getNearbyEntities(cn.nukkit.math.AxisAlignedBB, cn.nukkit.entity.Entity) @bci=103, line=2147 (Interpreted frame)
 - cn.nukkit.entity.EntityLiving.entityBaseTick(int) @bci=283, line=241 (Interpreted frame)
 - cn.nukkit.entity.Entity.onUpdate(int) @bci=85, line=1197 (Interpreted frame)
 - cn.nukkit.level.Level.doTick(int) @bci=992, line=803 (Compiled frame)
 - cn.nukkit.Server.checkTickUpdates(int, long) @bci=136, line=927 (Compiled frame)
 - cn.nukkit.Server.tick() @bci=104, line=1002 (Compiled frame)
 - cn.nukkit.Server.tickProcessor() @bci=15, line=800 (Interpreted frame)
 - cn.nukkit.Server.start() @bci=151, line=779 (Interpreted frame)
 - cn.nukkit.Server.<init>(cn.nukkit.utils.MainLogger, java.lang.String, java.lang.String, java.lang.String) @bci=2880, line=470 (Interpreted frame)
 - cn.nukkit.Nukkit.main(java.lang.String[]) @bci=191, line=68 (Interpreted frame)