Paper
Paper copied to clipboard
Chunk rendering issues after 1.19.2 update
Timings or Profile link
https://timings.aikar.co/dev/?id=58c37907d0984338a1f721b3cf6a217d
Description of issue
After updating my server to version 1.19.2 I noticed an issue where certain parts of certain chunks are getting rendered very slowly when teleporting to them. This issue might have been introducer earlier but I first noticed it after updating to 1.19.2. It does not happen when I log in to the server, it only happens when I teleport to certain locations. For some reason there are certain areas where some set of chunks consistently renders slowly, and it's not the entire chunk, it's just a part of the chunk as seen in the screenshot attached below. There is nothing unusual about these chunks, they do not contain a large number of entities or lots of redstone or anything like that. In fact, in the screenshot below all 4 corners of the building are identical but for some reason there is one corner that always experiences this issue. Most of the time it takes a few seconds for the chunks to fully render, but sometimes it takes up to 10 seconds for the chunks to fully render, which is very concerning to me.
This issue is not caused by insufficient server resources. My server has lots of unused RAM and CPU cycles when this issue occurs. There are not any significant spikes in RAM or CPU usage when this issue occurs. I have a good ping and the server performance is very good, even when this issue is occurring.
Here are my server stats: Ryzen 9 5900X 4.8 GHz (US & EU) | Ryzen 7 5800x 4.7 GHz (APAC) 4 Dedicated vCores | NVMe SSDs | 16GB DDR4 RAM
I have tested this on multiple different computers and multiple different accounts. It happens in multiple different areas on my server, all of which contain builds that I created in a previous version (1.18). I am not the only person to experience this issue, as others in the Paper Discord have said they also experience this issue. I have tested this in vanilla Minecraft, Spigot, and Paper and it only happens when I am using Paper. It is a very serious issue for me and I am desperate to get this issue resolved ASAP. I am happy to provide any additional information you need. Thank you for your help.
Plugin and Datapack List
I am able to reproduce this issue on a server which is not using any plugins or data packs.
Server config files
I am able to reproduce this issue on a server which is using the default configurations for all bukkit, spigot, and paper config files. I can create a brand new server using the latest paper JAR file without any config changes or plugins and reproduce this issue by teleporting to certain locations where this issue occurs.
Paper version
This server is running Paper version git-Paper-135 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: eff22eb) You are running the latest version Previous version: git-Paper-112 (MC: 1.19.2)
Other
Here is a screenshot of the bug / performance issue. As you can see, the ceiling has been rendered but the walls have not been rendered. To me, this suggests that it is not a chunk loading issue. It seems that the chunks are loading correctly and have been sent to the client, but for some reason the client is not rendering the entire chunk.
IMPORTANT: I have tested this exact issue on a vanilla Minecraft single-player world, a 1.19.2 Spigot server with default config and no plugins, and a 1.19.2 Paper server with default config and no plugins. This issue only occurs when I am using Paper.

Someone in the Paper Discord suggested that this may be related to "the workaround for client CPU spikes on chunk change"
Also, moving towards the chunks causes them to render much faster, almost immediately.
Okay I have learned something very interested about this bug. It is all about how chunks are loaded / rendered relative to the players location. This issue currently happens at my server spawn, as well as other locations. When I change my server spawn location by 1 block the chunks that fail to render change. This means it has nothing to do with those specific chunks.
Hey david, I am currently having this exact same issue with my spawn world. When you /spawn it seems like half the map is gone and renders very very slowly. I've attached an image

Have you tried setting -DPaper.WorkerThreadCount to 2 or more? With 4 vCPUs you are below 6, which will reduce your world worker threads to one effective thread. Chunks are updated way faster for players if you increase this jvm flag.
@Joshuak52 thanks for sharing, I think we are not the only ones experiencing this 🙂
@FriwiDev thanks for the suggestion, unfortunately that did not fix the problem.
I don't think this is a server performance issue. My server has very good performance even when this is happening.
I definitely think this is a bug in Paper.
I also believe this is a bug in paper, no one believes me and I am not getting any support. I am glad to have found your post hopefully we can find a fix together
It's not a matter of belief, it's a matter of repeatability, and we can't repeat it; This basically means that trying to diagnose this issue is already more complex before you get into the fact that this is a bug in an overengineered system of which fixing 1 issue tends to cause issues elsewhere, especially as it's about to be replaced.
I'd suggest testing the builds from #8177
It's not a matter of belief, it's a matter of repeatability, and we can't repeat it; This basically means that trying to diagnose this issue is already more complex before you get into the fact that this is a bug in an overengineered system of which fixing 1 issue tends to cause issues elsewhere, especially as it's about to be replaced.
I'd suggest testing the builds from #8177
I've made sure to make some backups but it seems that the build from the link you sent me has fixed all my issues. Thanks so much!
The builds from the chunk rewrite branch did not solve the issue for me.
Someone in the Paper Discord suggested that this may be related to "the workaround for client CPU spikes on chunk change"
If you think it was that change, did you compare the build before to the one after that commit? So you would not need speculation but could say for sure if that caused the issues for you or not.
I am able to reproduce this issue on a server which is using the default configurations for all bukkit, spigot, and paper config files. I can create a brand new server using the latest paper JAR file without any config changes or plugins and reproduce this issue by teleporting to certain locations where this issue occurs.
You could post the seed of the world and the exact teleport commands you used, so maybe someone can reproduce it.
The builds from the chunk rewrite branch did not solve the issue for me.
Hey sorry to hear about that, I also added -DPaper.WorkerThreadCount=6 to my startup script. These fixed all of my chunk issues
Closing on the basis that it seems modifying the worker thread counts and in general the chunk recode may resolve these possible issues.
If you are still experiencing this however feel free to comment and this can be reopened!