LuckPerms

LuckPerms

41.4k Downloads

Memory Leak on LuckPerms Velocity 5.4.119

NaTorOG opened this issue ยท 5 comments

commented

Description

image
image
image

After conducting some tests in these days, I finally have found that the issue could be with LuckPerms itself.

All the heapdumps, gclogs and monitoring was done with only luckperms running into Velocity.

The issue disappeared after removing LuckPerms from Velocity and conducting the same tests and gc logging.

Reproduction Steps

  1. Run Velocity with JavaFlags to print in a file the GC Logs
  2. Put LuckPerms
  3. Use Mysql/MariaDB
  4. Take an heapdump and inspect it

Useful info -> LP on Proxy is connected with LP on Lobby server (on Lobby server 1.19.4 Paper, its running LP with same version)

Expected Behaviour

Not having mem leaks

Server Details

Velocity 3.3.0 b360

LuckPerms Version

5.4.119

Logs and Configs

https://pastebin.com/eyxAvS0G

Extra Details

No response

commented

What makes you suspect there is a memory leak? Does the JVM crash running out of memory?

What you are showing with those screenshots is not a memory leak, LuckPerms messages can be translated to the viewer's langauge, by default it will fetch and load translations, that is a one time operation done during startup and the translations are kept loaded for rendering a message when sent to a viewer.

commented

What makes you suspect there is a memory leak? Does the JVM crash running out of memory?

What you are showing with those screenshots is not a memory leak, LuckPerms messages can be translated to the viewer's langauge, by default it will fetch and load translations, that is a one time operation done during startup and the translations are kept loaded for rendering a message when sent to a viewer.

Thanks for replying, I suspect because of GC behaviour having problems with Metaspace. When LuckPerms is not installed on Velocity, I don't have any kind of problems and the GC was working fine.

I don't think its a "very" memory leak, but there is this strange behaviour I have monitored in these days.

commented

Tests have been done with and without LuckPerms on Velocity. When LuckPerms was not installed, these GC problems disappeared.

commented

That sounds like a GC configuration problem. If you could provide the heap dump and the JVM flags used it can be investigated further, but without any more info there isn't much else to do.

commented

That sounds like a GC configuration problem. If you could provide the heap dump and the JVM flags used it can be investigated further, but without any more info there isn't much else to do.

I passed the HeapDump on discord, flags used were the recommended by Velocity Docs -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15