hafarooki / ExplosionReversal

A lightweight plugin for Minecraft servers which makes blocks destroyed by explosions regenerate.
MIT License
8 stars 7 forks source link

Warnings in Console - Cannot rename a temporary file in world_the_end #10

Closed MyrTheMoth closed 5 years ago

MyrTheMoth commented 5 years ago

The following exception is being thrown every few minutes on the server console, I saw another issue here closed that pertained to a similar error, but in this case, it has to do with world_the_end and renaming a temporal file rather than deleting it

It also seems to be causing skips and general instability on my spigot server, running on Windows 10, using the latest release to date (2.3.0)

[04:24:51] [Server thread/WARN]: java.nio.file.FileSystemException: .\world_the_end\data\explosion_regen.dat_tmp -> .\world_the_end\data\explosion_regen.dat: The process cannot access the file because it is being used by another process.

[04:24:51] [Server thread/WARN]:        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[04:24:51] [Server thread/WARN]:        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[04:24:51] [Server thread/WARN]:        at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
[04:24:51] [Server thread/WARN]:        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
[04:24:51] [Server thread/WARN]:        at java.nio.file.Files.move(Unknown Source)
[04:24:51] [Server thread/WARN]:        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:138)
[04:24:51] [Server thread/WARN]:        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48)
[04:24:51] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[04:24:51] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[04:24:51] [Server thread/WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[04:24:51] [Server thread/WARN]:        at java.lang.reflect.Method.invoke(Unknown Source)
[04:24:51] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
[04:24:51] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[04:24:51] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
[04:24:51] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
[04:24:51] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747)
[04:24:51] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646)
[04:24:51] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990)
[04:24:51] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815)
[04:24:51] [Server thread/WARN]:        at java.lang.Thread.run(Unknown Source)
hafarooki commented 5 years ago

Could you send a timings report?

hafarooki commented 5 years ago

2.3.1snapshot.zip Dos this fix it the renaming issue?

MyrTheMoth commented 5 years ago

Still happening on that snapshot unfortunately

As for timings, they all seem to happen in a single 3-burst per attempt Because I just realized it happens to every world folder rather than just the_end...

Also, the file it is trying to create or rename doesn't exist in any of those folders

[14:57:16] [Server thread/WARN]: java.nio.file.FileSystemException: .\world\data\explosion_regen.dat_tmp -> .\world\data\explosion_regen.dat: The process cannot access the file because it is being used by another process.

[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.nio.file.Files.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:138)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.lang.reflect.Method.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815)
[14:57:16] [Server thread/WARN]:        at java.lang.Thread.run(Unknown Source)
[14:57:16] [Server thread/WARN]: java.nio.file.FileSystemException: .\world_nether\data\explosion_regen.dat_tmp -> .\world_nether\data\explosion_regen.dat: The process cannot access the file because it is being used by another process.

[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.nio.file.Files.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:138)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.lang.reflect.Method.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815)
[14:57:16] [Server thread/WARN]:        at java.lang.Thread.run(Unknown Source)
[14:57:16] [Server thread/WARN]: java.nio.file.FileSystemException: .\world_the_end\data\explosion_regen.dat_tmp -> .\world_the_end\data\explosion_regen.dat: The process cannot access the file because it is being used by another process.

[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.nio.file.Files.move(Unknown Source)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:138)
[14:57:16] [Server thread/WARN]:        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:57:16] [Server thread/WARN]:        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at java.lang.reflect.Method.invoke(Unknown Source)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
[14:57:16] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990)
[14:57:16] [Server thread/WARN]:        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815)
[14:57:16] [Server thread/WARN]:        at java.lang.Thread.run(Unknown Source)
hafarooki commented 5 years ago

snapshot231.zip Try this?

And by timings report I meant /timings report, though I'm not sure how helpful that'd be if you are on Spigot. If you want me to investigate the lag issue, please use Paper and do /timings report (I haven't had any such lag issues myself) (I also generally highly recommend Paper, especially on 1.14.4)

MyrTheMoth commented 5 years ago

There's a completely new exception this time

Also, nevermind my stability complaints, it seems to have been a networking issue, but the plugin exceptions continue

I'll try to acquire a timings report for you soon

[00:19:49] [Server thread/ERROR]: Could not pass event WorldSaveEvent to ExplosionRegen v2.3.1
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Caused by: java.lang.UnsupportedOperationException: Unsupported copy option
        at sun.nio.fs.WindowsFileCopy.move(Unknown Source) ~[?:1.8.0_221]
        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source) ~[?:1.8.0_221]
        at java.nio.file.Files.move(Unknown Source) ~[?:1.8.0_221]
        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:99) ~[?:?]
        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        ... 8 more
[00:19:50] [Server thread/ERROR]: Could not pass event WorldSaveEvent to ExplosionRegen v2.3.1
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Caused by: java.lang.UnsupportedOperationException: Unsupported copy option
        at sun.nio.fs.WindowsFileCopy.move(Unknown Source) ~[?:1.8.0_221]
        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source) ~[?:1.8.0_221]
        at java.nio.file.Files.move(Unknown Source) ~[?:1.8.0_221]
        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:99) ~[?:?]
        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        ... 8 more
[00:19:50] [Server thread/ERROR]: Could not pass event WorldSaveEvent to ExplosionRegen v2.3.1
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.WorldServer.save(WorldServer.java:747) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.saveChunks(MinecraftServer.java:646) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:990) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:815) [spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
Caused by: java.lang.UnsupportedOperationException: Unsupported copy option
        at sun.nio.fs.WindowsFileCopy.move(Unknown Source) ~[?:1.8.0_221]
        at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source) ~[?:1.8.0_221]
        at java.nio.file.Files.move(Unknown Source) ~[?:1.8.0_221]
        at net.starlegacy.explosionregen.WorldData.save(WorldData.java:99) ~[?:?]
        at net.starlegacy.explosionregen.ExplosionRegenPlugin.onWorldSave(ExplosionRegenPlugin.java:48) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_221]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_221]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar:git-Spigot-ea7e48b-368f4e9]
        ... 8 more
hafarooki commented 5 years ago

snapshot231.zip How about this?

MyrTheMoth commented 5 years ago

I have switched to Paper (Honestly, this is my first time making a server in a long long time, I had no idea Paper was a thing, thank you for pointing it out!)

Here's the timings report, also, this snapshot has produced no exceptions so far the previous snapshot produced exceptions on Paper as well (same one as my previous post)

https://timings.aikar.co/?id=84d075d5dfae4cc1a9b11a735a028247

hafarooki commented 5 years ago

OK. By the way, while unrelated to ExplosionRegen, your biggest source of lag is pillager AI. Second biggest is world saving.