MemoriesOfTime / Nukkit-MOT

Support for multiple versions of Nukkit Minecraft Bedrock Edition Server Software
https://www.nukkit-mot.com
GNU Lesser General Public License v3.0
57 stars 27 forks source link

Memory leak when using LevelDB #272

Open BlusteryS opened 1 month ago

BlusteryS commented 1 month ago

🐞 Bug Feedback

πŸ“ Bug Description

When using LevelDB (no matter native or default), a large memory leak occurs. Objects appear that java cannot remove. In 5 minutes of flying around the world, about 1200 MB accumulated (not counting the 800 MB that is required for the start and login of the player).

When using anvil, even when loading chunks for 10-15 minutes, memory usage remains at ~ 800 MB (sometimes even less, it does not increase).

When using custom generators, values ​​can exceed 3 GB in a few minutes

I profiled the process through YourKit, but didn't find anything. 800 MB - not reachable to GC.

πŸ“Έ Screenshots / Video

image image

πŸ’» OS and versions

image

BlusteryS commented 1 month ago

When using Parallel GC, OOM is not caught, but memory still grows to the maximum.

I think the problem is in the library providing the leveldb implementation, but Java profilers can't find the reason.