squaremap

squaremap

1.9k Downloads

[Paper] Out of memory during full render

sudokou opened this issue · 22 comments

commented

After starting a fullrender on my overworld, I can watch free memory drop from 12G to 2G within a minute or so, and then the server crashes with OOM errors.

commented

Tested with Pl3xmap 1.18-2 - still happens

commented

Server version:

This server is running Paper version git-Paper-147 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 6f0762c)
You are running the latest version
Previous version: git-Paper-143 (MC: 1.18.1)

Also, using G1GC (from Aikar's flags: https://paper.readthedocs.io/en/latest/server/aikar-flags.html)

commented

Tested with radiusrender - still happens
Tested without Aikar's flags - still happens
Tested with 48GB memory - still happens

commented

Tested without any plugins - still happens
Tested with newest dev build of squaremap (55ccc5e) - still happens

commented

Tested with older version of paper - still happens

This server is running Paper version git-Paper-133 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 5e30e19)
You are 14 version(s) behind

commented

Tested older version of squaremap (d6a54f2) - still happens

commented

Can confirm I have the same issue. Freshly installed squaremap and started a fullrender, ~10 mins later the server crashed.

commented

@bdagenais2 I'm not sure you are aware but GitHub has a function to edit posts, which would be preferred to spamming 6 responses in the span of 3 hours.

commented

If you're having this issue please share information including logs, system configuration, startup script/flags, etc, simply saying "it crashes" doesn't give me much to go off of, heap dumps before the crash would also be useful.

commented

If you're having this issue please share information including logs, system configuration, startup script/flags, etc, simply saying "it crashes" doesn't give me much to go off of, heap dumps before the crash would also be useful.

You have my paper version, plugin version, startup flags, and memory committed to Minecraft. I'll try to grab some logs.

commented

The exact flags are important - for example when allocating 10+ gb with Aikars flags there are adjustments that need to be made

commented

There are adjustments that CAN be made, not required. In fact, the guide includes a warning that if performance is worse after making adjustments, you can change back to the defaults.

For your viewing pleasure: https://paste.gg/p/anonymous/01c2f20ba4514489b46dffe3fd17bcc2

Also, note that earlier I shared that I tested without any flags and still had the issue.


Log: https://paste.gg/p/anonymous/67d53c77d941495eb5b04168cf3fcd57

commented

So, I've had this happen before, but since haven't been able to reproduce it. If this happens consistently for anyone, in addition to logs, heap dumps from right before it crashes (preferably with lower memory allocated for a smaller dump) would help. What would really help is if I could get it to happen locally with a debugger attached... From what I've seen so far though I'm inclined to think it might be a Paper issue rather than a squaremap one, but again I won't be sure until I'm able to look deeper, ie see some heap dumps or reproduce locally

commented

It happens consistently for me, I've done it 24 times today. Would you like to get in a Discord call and walk me through grabbing the information you need? sudoyou#1015

commented

Just start the server with 1 or 2 gb of ram (the heap dump will be a file the size of allocated memory), start a render, and when it looks like it will crash somewhat soon, run /paper heap. If that doesn't work for some reason you may need to use a tool like visualvm to create the dump.

commented

@jpenilla I'm collecting these heaps for you now. Something maybe somewhat interesting - I have 2 servers and it only happens on one of them.

One server has 4GB memory allocated to it, and a 4 thread CPU. Map rendering happens at ~ 250cps. The world is 10k by 10k. It has NO issues.

The other server has 16GB memory allocated to it, and a 16 thread CPU. Map rendering happens at ~ 1000cps. The world is 20k by 20k. This is the one that crashes within 2 minutes.

commented

I can access it now, thanks. Will have a look soon

commented

Here's a link to the dumps - drive.google.com/drive/folders/1L_PMKQDTY7-cJ5EUQCbcDN1K1nuX79vP?usp=sharing

I'm unable to access this link without a login

commented

Here's a link to the dumps - drive.google.com/drive/folders/1L_PMKQDTY7-cJ5EUQCbcDN1K1nuX79vP?usp=sharing

I'm unable to access this link without a login

Try now

commented

I can reproduce this on git-Paper-148 (MC: 1.18.1).

commented

This should be "fixed" now, it's not a solution to the actual root problem, and will slightly decrease render speeds, however it does solve the issue at hand from my testing