Whenever I start up 18w44a on a world that was created fresh for 18w43b, the server will not stay up for more than about 70 seconds. This is freshly started, with no users logged on.
My JVM options are as follows:
java -Xmx4G -Xmx4G -Xmn128M -Xincgc -jar server.jar nogui
Here's the console output:
[12:48:51] [Server thread/WARN]: Keeping entity minecraft:zombie_pigman that already exists with UUID bc2e7a4f-cb60-4b1b-995c-9197c345a2dd
[12:48:51] [Server thread/WARN]: Keeping entity minecraft:cow that already exists with UUID 97196cb7-a069-4e23-8a64-04a95b575928
[12:48:53] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2044ms or 40 ticks behind
[12:50:04] [Server Watchdog/FATAL]: A single server tick took 60.00 seconds (should be max 0.05)
[12:50:04] [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown.
[12:50:05] [Server Watchdog/ERROR]: This crash report has been saved to: /home/minecraft/snapshot_test/./crash-reports/crash-2018-11-01_12.50.05-server.txt
[12:50:05] [Server Shutdown Thread/INFO]: Stopping server
This is the stack trace from the offending thread:
java.lang.Error
at azt.a(SourceFile:1800)
at tz.n(SourceFile:700)
at tz.a(SourceFile:606)
at ua.a(SourceFile:180)
at net.minecraft.server.MinecraftServer.b(SourceFile:748)
at ti.b(SourceFile:360)
at net.minecraft.server.MinecraftServer.a(SourceFile:685)
at net.minecraft.server.MinecraftServer.run(SourceFile:573)
at java.lang.Thread.run(Thread.java:748)
Gnembon told me he's pretty sure that azt.a
is related to "mob counting for spawn reasons." My suspicion is that there is mob overload due to some earlier snapshot not implementing a mob cap properly. But if it's spending too much time counting mobs, then it should just stop early. There's also the possibility that the watchdog bug (which Gnembon had provided a fix for) is back.
I enabled profiling (honest profiler), and here's the dominant part of the call tree:
(t 100.0,s 13.5) java.lang.Thread::run
(t 86.4,s 0.1) net.minecraft.server.MinecraftServer::run
(t 81.0,s 0.0) net.minecraft.server.MinecraftServer::a
(t 81.0,s 0.0) ti::b
(t 81.0,s 0.0) net.minecraft.server.MinecraftServer::b
(t 66.1,s 0.0) ua::a
(t 66.1,s 0.0) tz::a
(t 66.0,s 0.3) tz::n
(t 55.8,s 2.3) azt::a
(t 17.7,s 0.0) bnh::b
(t 15.1,s 0.0) bet::c
(t 14.9,s 0.1) bjt::a
(t 4.4,s 0.1) bjt::b
(t 4.1,s 0.0) azx::D
So basically, azt::a
accounted for 55% of the one minute that the server managed to stay up.
Going on the hypothesis that mob overload might be related to the problem, I restarted with a fresh empty world. It's definitely still a huge problem that we have one thread hammering the CPU at 100%. but the server manages to stay up. Now it's back to having Thread::yield wasting CPU time in a tight loop, which is the topic of MC-138071.
Related issues
Attachments
Comments


Now that I think about it, if azt.a
is related to mob counting, why is the server trying to count mobs in the first place? Shouldn't it be keeping a running total (or set thereof) that is incremented when one spawns, decremented when one despawns, and modified when chunks are loaded and unloaded? If it's counting every tick for fear of the running total getting out of sync with the real total, then there are some much more serious problems.
Similar issue happening with 18w46a: server is now frequently overloaded even if no-one is on, and can be easily crashed upon exceeded max tick delay. Same map since 18w44a.

Ubuntu 18.04
Can confirm it for 18w50a on an internal or standalone server.
Standalone server:
[media]Pre-load❓ time, before anything will show up in a console, takes ~ 30 seconds. It takes so long to start a server (usually 58 seconds, the highest time I got was 145 seconds). After some time, server crashes after exceeding 1-minute tick delay (Watchdog)

This issue still occurs on 19w02
Can you check if this is still an issue in 1.14 Pre-Release 5?

Please check if that's still an issue for you in the latest 1.14 (pre-)release.