osu icon indicating copy to clipboard operation
osu copied to clipboard

[Memory leak] Long time running of the lazer will result in an increasing amount of memory that will not be released

Open wanjiaXG opened this issue 1 year ago • 3 comments

Type

Performance

Bug description

After running the lazer for a long time, the memory will increase at a speed of approximately 600-700m/h and will not be released,

test method:

Lazer only has two mapset.

Turn on NF+DT+AUTO, then play the complete map with the video, and keep repeating this process

After running continuously for 2 hours, the trend of memory changes is shown in the figure.

QQ图片20240104010954

QQ截图20240104011816

I am testing under the windowed setting, and if using fullscreen, there will be slightly more memory, and the peak after 2 hours will be to 3G.

The same issue https://github.com/ppy/osu/issues/26192 Because I am unable to reopen old issue, so I am opening a new issue.

Memory dump file(2.35G) has been sent to [email protected].

Stable also has similar issues, but the Lazer has not experienced any crashes so far, it may cause other problems in the future.

Screenshots or videos

No response

Version

osu! 2023.1224.0-lazer

Logs

compressed-logs.zip

wanjiaXG avatar Jan 03 '24 17:01 wanjiaXG

Please test without video, since you seem to be implying that it is video related but not directly stating that.

peppy avatar Jan 03 '24 17:01 peppy

Please test without video, since you seem to be implying that it is video related but not directly stating that.

Yes, the cause may be similar to that stable, enabled video background will result in memory leak. This image is a test of disabled the video background and the memory changes after running for 1 hour. The memory at the beginning and end remains almost unchanged

QQ截图20240104025548

wanjiaXG avatar Jan 03 '24 18:01 wanjiaXG

Since you are on D3D renderer, probably a duplicate/extension of https://github.com/ppy/osu/issues/23258? If this can't be reproduced with LegacyGL then most likely it is.

EVAST9919 avatar Jan 03 '24 21:01 EVAST9919

It would make more sense to be honest, if the issue you reported is also specifically video not storyboards in general.

@EVAST9919 want to confirm with a beatmap that doesn't have video vs one that does and close your issue in favour of this one if that's the case?

peppy avatar Jan 04 '24 03:01 peppy

Unfortunately I was talking about storyboards, and the issue can still be replicated. It looks like I musunderstood this one. In my case on D3D allocated VRAM is never freed even when using "Clear all caches" and when it overflows and goes to RAM, it can't be cleared as well (which is not the case on LegacyGL).

Regarding this one, I can replicate ram usage increase by playing maps with a video, however purging cache immediately helps.

EVAST9919 avatar Jan 05 '24 00:01 EVAST9919

Will likely be fixed in the next release by https://github.com/ppy/veldrid/pull/54

smoogipoo avatar May 12 '24 14:05 smoogipoo