BlueMap

BlueMap

85.1k Downloads

Memoryleak

videosambo opened this issue ยท 20 comments

commented

What i did / Steps to reproduce

I installed latest build on my survival server with papermc.

Expected result

Plugin would work normally as long as server stays on.

Actual result

I have monitored my server ram usage and looks like BlueMap latest build 1.7.2 has memoryleak somewhere or badly stored variable. Server itself uses 5Gb of ram in avarage and when I enable BlueMap and keep server running for like 6 hours, ram usage climps up to 16Gb which is maxium of my server and when I use PlugMan to unload BlueMap, ram usage drops back to 5Gb.

Context

BlueMap Version:
BlueMap-1.7.2-spigot

Server os: linux
Java version: Java 17
Server software: Paper (paper-1.18-63)

I use default configs, only webserver port changed

Also there is screenshot when I unloaded BlueMap using PlugMan
unknown
Example of crashreport:
crash-2021-12-09_16.44.36-server.txt
n

commented

Did this not occur with an earlier version of bluemap and (if yes) which version was that?

commented

Also on your crash-report it says this:
Memory: 1614616664 bytes (1539 MiB) / 15988686848 bytes (15248 MiB) up to 17179869184 bytes (16384 MiB)

This means, that although the JVM has allocated almost all 16GiB of memory, it is only actually using about 1.5GiB when the crash happened

commented

Did this not occur with an earlier version of bluemap and (if yes) which version was that?

I'l check if this occurs on older versions. I just installed BlueMap 1.7.1 on my server and I'l reply to this feed in about 6 hours

commented

There were almost no changes between 1.7.1 and 1.7.2 .. it would be interesting if this happens with 1.6.3 ^^

commented

There were almost no changes between 1.7.1 and 1.7.2 .. it would be interesting if this happens with 1.6.3 ^^

Same happens in 1.7.1. I'l try 1.6.3 next

commented

1.6.3 Does not have this problem. Ram usage stays under 8Gb

commented

Between 1.6.3 and 1.7.x i changed the way all files are being written to disk (in preparation for sql-storage) so there definitely could be something i missed, maybe somewhere file-streams don't get closed properly or so.

commented

I will try to reproduce this with a heap-dunk ready tomorrow or monday ..

I got 3 separate reports of high memory usage in the last week,.. the first two i was like: "yeah u guys are just measuring the memory wrong and mistake reserved memory with used memory"... but now with 3 people in a week i want to investigate this ^^

commented

Did you make your world in 1.17 or in 1.18?

commented

How would that make a difference?

commented

Just curious since there is a known memory leak with old worlds being upgraded, so this might not have anything to do with BlueMap.

commented

Did you make your world in 1.17 or in 1.18?

I made world on 1.18

commented

I just noticed that I completely forgot that 1.6.3 is not even supporting 1.18 worlds ... So the problem being gone with 1.6.3 could be very well just the fact that it wasn't doing anything ...

Well, I hope I can reproduce it :)

commented

@videosambo I am not able to reproduce your issue.. :/

I created a Paper-Server on 1.18 with bluemap 1.7.2 and let that run the whole day, while my player was driving in a minecart a long way back and forth, triggering block changes ... "simulating an active server" ...
Nothing,.. server had 4GiB RAM max and used 2 of them consistently. The final Heap-Dump showed bluemap using only 200MB.

If you are able to somehow make a Heap-Dump of your Server during your issue and provide that for me, then i might be able do analyse that further. Otherwise i feel like i am in a dead-end here :/

commented

@videosambo I am not able to reproduce your issue.. :/

I created a Paper-Server on 1.18 with bluemap 1.7.2 and let that run the whole day, while my player was driving in a minecart a long way back and forth, triggering block changes ... "simulating an active server" ... Nothing,.. server had 4GiB RAM max and used 2 of them consistently. The final Heap-Dump showed bluemap using only 200MB.

If you are able to somehow make a Heap-Dump of your Server during your issue and provide that for me, then i might be able do analyse that further. Otherwise i feel like i am in a dead-end here :/

Could problem be with Java? I run my server on docker and I use default startup flags with no gc. What versio of java did you use?

And if you are intrested in checking problem in my end, I can give you credentials to my server.

commented

I just replicated the memory leak..
When loading the plugin with plugman:
image

When unloading with plugman:
image

commented

I just replicated the memory leak.. When loading the plugin with plugman: image

When unloading with plugman: image

I dont mean this, I mean that plugin is on for several hours and allocates all of the memory to point where server crashes. But I managed to keep my server running by restarting BlueMap with plugman requrally every 6 hours or so

commented

I will try to redownload latest build just to check that current one isn't corrupted or something idk

commented

@videosambo any news on this?
If you still have this issue, please reopen it with a heap-dump of your server. You can create one using /paper heap :)

commented

@videosambo any news on this? If you still have this issue, please reopen it with a heap-dump of your server. You can create one using /paper heap :)

I am now im army so I have been quiet. I replacee bluemap jar and now no crashes. So problem was propably corrupted jar