PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

NBT Corruption Bug When Server Ran out of Storage #2032

Closed Samkist closed 2 years ago

Samkist commented 2 years ago

Terms

Discord tag (optional)

Samkist#6600

What happened?

I had this error

[20:59:08 ERROR]: [ItemsAdder] Corrupted region data! Copying it into '_corrupted' folder. Loading NBT data
[20:59:08 ERROR]: Encountered an unexpected exception
java.lang.NullPointerException: Cannot invoke "dev.lone.itemsadder.main.dB.b(org.bukkit.block.Block, String)" because "<local6>" is null
        at dev.lone.itemsadder.main.bY.a(SourceFile:256) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.bY.e(SourceFile:198) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.gv.z(SourceFile:64) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.gA.a(SourceFile:103) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.gA.a(SourceFile:95) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.gA.a(SourceFile:74) ~[ItemsAdder_3.2.3m.jar:?]
        at dev.lone.itemsadder.main.gA.populate(SourceFile:66) ~[ItemsAdder_3.2.3m.jar:?]
        at net.minecraft.world.level.chunk.LevelChunk.loadCallback(LevelChunk.java:930) ~[?:?]
        at net.minecraft.world.level.chunk.LevelChunk.onChunkLoad(LevelChunk.java:851) ~[?:?]
        at io.papermc.paper.chunk.system.scheduling.NewChunkHolder.handleFullStatusChange(NewChunkHolder.java:1310) ~[paper-1.19.2.jar:git-Paper-199]
        at io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processPendingFullUpdate(ChunkHolderManager.java:1036) ~[paper-1.19.2.jar:git-Paper-199]
        at io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processTicketUpdates(ChunkHolderManager.java:1020) ~[paper-1.19.2.jar:git-Paper-199]
        at io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processTicketUpdates(ChunkHolderManager.java:905) ~[paper-1.19.2.jar:git-Paper-199]
        at net.minecraft.server.level.ServerChunkCache.runDistanceManagerUpdates(ServerChunkCache.java:582) ~[?:?]
        at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.pollTask(ServerChunkCache.java:1000) ~[?:?]
        at net.minecraft.server.level.ServerChunkCache.pollTask(ServerChunkCache.java:578) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1329) ~[paper-1.19.2.jar:git-Paper-199]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1311) ~[paper-1.19.2.jar:git-Paper-199]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1289) ~[paper-1.19.2.jar:git-Paper-199]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1177) ~[paper-1.19.2.jar:git-Paper-199]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-199]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

It was caused by ItemsAdder saving NBT data when the server ran out of space I looked on the issue github and attempted to find an answer, and I found one saying to remove my corrupted NBT files. So I did. This proceeded to break the server even more and now I only have thread dumps. Anyone have any ideas?

Steps to reproduce the issue

  1. Install ItemsAdder
  2. Install default item pack
  3. Let server run while at max storage
  4. NBT data corrupts files and chunks
  5. ItemsAdder moves .nbt files to corrupt folder
  6. Remove .nbt files with the corrupt data in them
  7. Paper dumps thread

Server version

I cannot write this, because my server wont even start. However it is paper 1.19 build #204.

ItemsAdder Version

3.2.3-r9

ProtocolLib Version

Build #600 (Latest 1.19 version)

LoneLibs Version

1.0.21

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

2022-10-11-28.log

Error (optional)

[22:02:21] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-199 (MC: 1.19.2) ---
[22:02:21] [Paper Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump
[22:02:21] [Paper Watchdog Thread/ERROR]: ------------------------------
[22:02:21] [Paper Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[22:02:21] [Paper Watchdog Thread/ERROR]: [ChunkTaskScheduler] Chunk wait task info below: 
[22:02:21] [Paper Watchdog Thread/ERROR]: [ChunkTaskScheduler] Chunk wait: [( 44,-181) in 'world']
[22:02:21] [Paper Watchdog Thread/ERROR]: [ChunkTaskScheduler] Chunk holder: NewChunkHolder{world=world, chunkX=44, chunkZ=-181, entityChunkFromDisk=false, lastChunkCompletion={chunk_class=net.minecraft.world.level.chunk.ProtoChunk,status=minecraft:features}, currentGenStatus=minecraft:features, requestedGenStatus=minecraft:full, generationTask=null, generationTaskStatus=null, priority=BLOCKING, priorityLocked=false, neighbourRequestedPriority=IDLE, effective_priority=BLOCKING, oldTicketLevel=33, currentTicketLevel=33, totalNeighboursUsingThisChunk=0, fullNeighbourChunksLoadedBitset=1597440, chunkStatusRaw=0, currentChunkStatus=INACCESSIBLE, pendingChunkStatus=INACCESSIBLE, is_unload_safe=ticket_level, killed=false}
[22:02:21] [Paper Watchdog Thread/ERROR]: ------------------------------
[22:02:21] [Paper Watchdog Thread/ERROR]: Current Thread: Server thread
[22:02:21] [Paper Watchdog Thread/ERROR]:   PID: 26 | Suspended: false | Native: false | State: TIMED_WAITING
[22:02:21] [Paper Watchdog Thread/ERROR]:   Stack:
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/jdk.internal.misc.Unsafe.park(Native Method)
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.util.thread.BlockableEventLoop.waitForTasks(BlockableEventLoop.java:148)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:137)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:450)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.Level.getChunk(Level.java:502)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.Level.getBlockState(Level.java:780)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.redstone.CollectingNeighborUpdater$MultiNeighborUpdate.runNext(CollectingNeighborUpdater.java:121)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.redstone.CollectingNeighborUpdater.runUpdates(CollectingNeighborUpdater.java:79)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.redstone.CollectingNeighborUpdater.addAndRun(CollectingNeighborUpdater.java:63)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.redstone.CollectingNeighborUpdater.updateNeighborsAtExceptFromFacing(CollectingNeighborUpdater.java:45)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerLevel.updateNeighborsAt(ServerLevel.java:1721)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerLevel.blockUpdated(ServerLevel.java:2342)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.Level.notifyAndUpdatePhysics(Level.java:637)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.Level.setBlock(Level.java:604)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.Level.setBlock(Level.java:513)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.setTypeAndData(CraftBlock.java:210)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.setTypeAndData(CraftBlock.java:195)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.setBlockData(CraftBlock.java:191)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.setBlockData(CraftBlock.java:185)
[22:02:21] [Paper Watchdog Thread/ERROR]:       ItemsAdder_3.2.3-r9.jar//dev.lone.itemsadder.main.cR.a(SourceFile:249)
[22:02:21] [Paper Watchdog Thread/ERROR]:       ItemsAdder_3.2.3-r9.jar//dev.lone.itemsadder.main.cR.a(SourceFile:202)
[22:02:21] [Paper Watchdog Thread/ERROR]:       ItemsAdder_3.2.3-r9.jar//dev.lone.itemsadder.main.cR.b(SourceFile:568)
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(DirectMethodHandle$Holder)
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/java.lang.invoke.LambdaForm$MH/0x00000008030f9400.invoke(LambdaForm$MH)
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/java.lang.invoke.LambdaForm$MH/0x00000008021f0000.invoke_MT(LambdaForm$MH)
[22:02:21] [Paper Watchdog Thread/ERROR]:       com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37)
[22:02:21] [Paper Watchdog Thread/ERROR]:       co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[22:02:21] [Paper Watchdog Thread/ERROR]:       org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:670)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.chunk.LevelChunk.loadCallback(LevelChunk.java:913)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.world.level.chunk.LevelChunk.onChunkLoad(LevelChunk.java:851)
[22:02:21] [Paper Watchdog Thread/ERROR]:       io.papermc.paper.chunk.system.scheduling.NewChunkHolder.handleFullStatusChange(NewChunkHolder.java:1310)
[22:02:21] [Paper Watchdog Thread/ERROR]:       io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processPendingFullUpdate(ChunkHolderManager.java:1036)
[22:02:21] [Paper Watchdog Thread/ERROR]:       io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processTicketUpdates(ChunkHolderManager.java:1020)
[22:02:21] [Paper Watchdog Thread/ERROR]:       io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.processTicketUpdates(ChunkHolderManager.java:905)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerChunkCache.runDistanceManagerUpdates(ServerChunkCache.java:582)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.pollTask(ServerChunkCache.java:1000)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.level.ServerChunkCache.pollTask(ServerChunkCache.java:578)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1329)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1311)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1389)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305)
[22:02:21] [Paper Watchdog Thread/ERROR]:       net.minecraft.server.MinecraftServer$$Lambda$4340/0x00000008014c9a78.run(Unknown Source)
[22:02:21] [Paper Watchdog Thread/ERROR]:       java.base@17.0.2/java.lang.Thread.run(Thread.java:833)
[22:02:21] [Paper Watchdog Thread/ERROR]: ------------------------------
[22:02:21] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[22:02:21] [Paper Watchdog Thread/ERROR]: ------------------------------
[22:02:26] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-199 (MC: 1.19.2) ---
[22:02:26] [Paper Watchdog Thread/ERROR]: The server has not responded for 15 seconds! Creating thread dump
[22:02:26] [Paper Watchdog Thread/ERROR]: ------------------------------

ItemsAdder config.yml

metrics: true
update-checker: true
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: false
      server-ip: 127.0.0.1
      pack-port: 8163
    external-host:
      enabled: true
      url: https://www.dropbox.com/s/ig3wv3jrl2uiyv1/pack.zip?dl=0
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: true
  kick-player-on-decline: false
  kick-player-on-fail: false
  delay-ticks: 1
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: true
    hide-hud: true
    cancel-movement: true
    lock-player: true
  command:
    usage-cooldown-seconds: 60
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    protect-file-from-unzip:
      enabled: false
      extreme: false
    compress-png-files: true
    compress-json-files: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    generate-custom-armors-textures:
      vanilla_1_17: true
      optifine: true
    disable-overwrite-leather-armor-layers-textures: false
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - psd
    - html
    - gz
    - rar
    - zip
    - 7z
    - bbmodel
    - iaentitymodel
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: en
  dictionaries-lang: en
  extract-default-resources: false
  extract-default-configs: false
  legacy_pack: false
blocks:
  light-api: true
  fix-liquids-flow: true
  fix-floating-blocks: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire:
    unlit-on-place: true
    allow-any-item: true
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: true
  disable-FIRE: false
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: true
  hide-custom-durability-lore: false
liquids:
  enabled: true
huds:
  enabled: true
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  replace-in-customitems-name-and-lore: true
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: true
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 1200
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
effects:
  hide-scoreboard-numbers: false
  text-effects:
    enabled: true
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: true
    sign:
      enabled: true
    book:
      enabled: true
    anvil:
      enabled: true
entities:
  max-furniture-vehicles-per-chunk: 30
  allow-removing-old-furnitures_2_3_11: false
  custom-entitites:
    enabled: true
    interval-rendering-packets-ticks: 1
    emotes: true
    optimized-packets: true
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  fix-packet-too-large-kick: false
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
debug:
  items:
    log-files-loading: false
    log-items-loading: false
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: false
    log-loots-loading: false
    log-loots-loading-disabled: false
    log-armors-loading: false
  recipes:
    log-recipes-loading: false
    log-recipes-loading-disabled: false
    log-recipes-removed-vanilla: false
    log-fix-packet-too-large: false
    log-recipes-unknown-item: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: false
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: false
    log-generation: false
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
  player-stats:
    log-save: false
  performance:
    loading-ms: true
  huds:
    log-triggers: false
  other:
    log-dictionaries-loading: false
    log-liquids-loading: false
    log-minecraft_lang_overwrite-loading: false
  categories:
    log-total-loaded: true
    log-single-loaded: true
    log-single-loaded-overwrite: true
    log-single-skip: true
    log-icon-failed-load: false
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
  cave-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
chat-preview: false

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 2 years ago

This proceeded to break the server even more and now I only have thread dumps.

Deleting the corrupted NBT data won't cause your server to "break even more". The NBT files are inside your worlds folders, in the region_custom_blocks, region_custom_liquids, region_various_blocks. The one of your previous logs should have stated which file got corrupted and can be deleted.

Make sure you restore to a backup before the server ran out of storage.

Running out of storage causes ALL your plugins and worlds files to possibly break due to the fact that the server cannot save data on a full disk and it only partially applies the change to such files.