Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash -> dont start #86

Open
Envel-Nikita-Gutsenkov opened this issue Jul 5, 2020 · 8 comments
Open

crash -> dont start #86

Envel-Nikita-Gutsenkov opened this issue Jul 5, 2020 · 8 comments

Comments

@Envel-Nikita-Gutsenkov
Copy link

[11:46:45 WARN]: [PopulationDensity] Task #2 for PopulationDensity v5.12 generated an exception
java.lang.ThreadDeath: null
at java.lang.Thread.stop(Unknown Source) [?:1.8.0_251]
at net.minecraft.server.v1_15_R1.MinecraftServer.stop(MinecraftServer.java:736) ~[patched_1.15.2.jar:git-Tuinity-"cb75b52"]
at net.minecraft.server.v1_15_R1.DedicatedServer.stop(DedicatedServer.java:754) ~[patched_1.15.2.jar:git-Tuinity-"cb75b52"]
at net.minecraft.server.v1_15_R1.MinecraftServer.close(MinecraftServer.java:712) ~[patched_1.15.2.jar:git-Tuinity-"cb75b52"]
at org.spigotmc.WatchdogThread.run(WatchdogThread.java:236) ~[patched_1.15.2.jar:git-Tuinity-"cb75b52"]
[11:46:45 ERROR]: Main thread terminated by WatchDog due to hard crash
java.lang.ThreadDeath: null

@RoboMWM
Copy link
Member

RoboMWM commented Jul 5, 2020

ThreadDeath...?

Need more log

@zedwick
Copy link
Collaborator

zedwick commented Jul 14, 2020

Having just updated my own server I experienced what I believe to be the same issue. It's caused by the scan region task taking too long, and the server stopping itself. I've not fixed the issue, but my mitigation has been to add a new config option to allow disabling the ScanRegionTask entirely.

I don't have this problem on my test server, only in production.

[12:36:56] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-89 (MC: 1.16.1) ---                                                                          
[12:36:56] [Paper Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump                                                                                                        
[12:36:56] [Paper Watchdog Thread/ERROR]: ------------------------------                                                                                                                                           
[12:36:56] [Paper Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):                                                                                                   
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk wait task info below:                                                                                                                                              
[12:36:56] [Paper Watchdog Thread/ERROR]: -366,-23 in 'world:                                                                                                                                                      
[12:36:56] [Paper Watchdog Thread/ERROR]: Load Task - none                                                                                                                                                         
[12:36:56] [Paper Watchdog Thread/ERROR]: Save Task - none                                                                                                                                                         
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk Holder - non-null                                                                                                                                                  
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk Status - minecraft:full                                                                                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk Ticket Status - minecraft:full                                                                                                                                     
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk Holder Status - minecraft:features                                                                                                                                 
[12:36:56] [Paper Watchdog Thread/ERROR]: Chunk Holder Priority - 2                                                                                                                                                
[12:36:56] [Paper Watchdog Thread/ERROR]: ------------------------------                                                                                                                                           
[12:36:56] [Paper Watchdog Thread/ERROR]: Current Thread: Server thread                                                                                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:       PID: 31 | Suspended: false | Native: false | State: TIMED_WAITING                                                                                                  
[12:36:56] [Paper Watchdog Thread/ERROR]:       Stack:                                                                                                                                                             
[12:36:56] [Paper Watchdog Thread/ERROR]:               [email protected]/jdk.internal.misc.Unsafe.park(Native Method)                                                                                              
[12:36:56] [Paper Watchdog Thread/ERROR]:               [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)                                                                    
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.IAsyncTaskHandler.bk(IAsyncTaskHandler.java:131)                                                                        
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:120)                                                                
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:511)                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.IChunkProvider.getChunkAt(SourceFile:16)                                                                                
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//org.bukkit.craftbukkit.v1_16_R1.CraftWorld.getChunkAt(CraftWorld.java:409)                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               me.ryanhamshire.PopulationDensity.PopulationDensity.scanRegion(PopulationDensity.java:1264)                                                                
[12:36:56] [Paper Watchdog Thread/ERROR]:               me.ryanhamshire.PopulationDensity.ScanOpenRegionTask.run(ScanOpenRegionTask.java:27)                                                                       
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftTask.run(CraftTask.java:99)                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468)                                                 
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1291)                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:377)                                                                             
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1212)                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1000)                                                                            
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177)                                                                    
[12:36:56] [Paper Watchdog Thread/ERROR]:               app//net.minecraft.server.v1_16_R1.MinecraftServer$$Lambda$3044/0x0000000840829440.run(Unknown Source)                                                     
[12:36:56] [Paper Watchdog Thread/ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:834)                                                                                                     
[12:36:56] [Paper Watchdog Thread/ERROR]: ------------------------------                                                                                                                                           
[12:36:56] [Paper Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---                                                                                                       
[12:36:56] [Paper Watchdog Thread/ERROR]: ------------------------------  

Which repeats until Paper stops the server. Will need to figure out why it's taking so long to complete the region scan.

@RoboMWM
Copy link
Member

RoboMWM commented Jul 15, 2020

Tbh, if we can get this to use Paper's API for chunk loading, I wouldn't be opposed (with a fallback so this can still be published to spigot) since spigot is no longer hosting the Bukkit API on their maven repo. Otherwise any other mitigation you wish to implement is fair game.

@zedwick
Copy link
Collaborator

zedwick commented Jul 16, 2020

There is PaperLib.

PaperLib is a plugin library for interfacing with Paper specific APIs (such as async chunk loading), with graceful fallbacks maintaining compatibility with both the Bukkit and Spigot API's.

Which would make it easy to use async chunk loading/generating on Paper, and sync chunk loading/generating on Spigot. Though I've not tried this yet, myself.

@RoboMWM
Copy link
Member

RoboMWM commented Jul 17, 2020

Ah yea, for some reason I forgot about PaperLib. I've used it in a project and it is pretty easy to use.

I believe I've used this in another project, but here's where I used it along with TaskChain, which may also be helpful if you're looking to refactor that code logic. https://github.com/MLG-Fortress/WildWormholes

@zedwick
Copy link
Collaborator

zedwick commented Jul 19, 2020

TaskChain

I don't need to use the region scan feature on my server very often, so this isn't a high priority for me to work on. If anyone else is interested in improving its performance, please feel free to submit a PR. Otherwise I will probably look at this eventually.

@RoboMWM
Copy link
Member

RoboMWM commented Jul 20, 2020

The easiest optimization is probably to not have it run on server startup or delay it to run several minutes afterwards, and then keep the interval as-is for future scans.

@DerekWearmouth
Copy link

DerekWearmouth commented Jul 23, 2020

The easiest optimization is probably to not have it run on server startup or delay it to run several minutes afterwards, and then keep the interval as-is for future scans.

The issue is that this crash issues is trigger more than on just scans, its trigger between scans as well. I mention as my scans are set to every 24hrs and we experienced massive crash./rollbacks 8 times yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants