scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.08k stars 328 forks source link

OOM while running tests #6521

Closed tgodzik closed 2 months ago

tgodzik commented 3 months ago

Describe the bug

Originally raised in https://github.com/scalameta/metals/issues/6484, but it's not related. It's most likely an issue in Bloop

Citing original posts:

I am facing also this issue when I run tests within vscode. I've created a public github repo where the issue can be reproduced:

In my box it starts bloop.Server with 3GB of ram. It takes several runs to run out of memory, about 8 runs but lets say in 10-20 runs it should definatelly run out of mem with 3GB. But you can see that it piles up memory if you run jconsole and click the "memory" tab. Memory usage increases and even if you run a "GC" it doesn't go down (by much), eventually more and more memory is used until it runs outofmem.

image

Expected behavior

No response

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.3.1

Extra context or search terms

OOM test explorer

kostaskougios commented 3 months ago

Hi @tgodzik , it seems that this bug is no more. I tried the above project of mine, running the test and monitoring boop.Server memory, and it garbage collects now, always dropping below 100MB after running a GC which is good.

image

I've run the test many times and it all seems good now. Do you know of any change that may have fixed it? I am on

image

but installed also a snapshot that fixed an other bug I was interested. Bloop seems to be on
bloop-frontend_2.12-1.5.18.jar

kostaskougios commented 3 months ago

(this issue seems to be fixed now)

tgodzik commented 3 months ago

I am not aware of anything that could have fixed it :thinking: But again I am not aware of anything that could have caused it in the first place :sweat_smile:

Let's keep it open for a while to see if that repeats. Might be a concurrency issue that causes some resources not to be freed.

github-actions[bot] commented 2 months ago

This issue was closed because no new information was added for the last 30 days. If you have any relevant information, feel free to add it and reopen the issue.