Bug 21894 – Memory leak in DMD semantic server.

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2021-05-05T21:31:06Z
Last change time
2022-09-21T01:36:09Z
Assigned to
No Owner
Creator
Blatnik

Attachments

IDFilenameSummaryContent-TypeSize
1822Capture.PNGUsing 10GB after only 5 minutes of running VisualD.image/png6020

Comments

Comment #0 by blatblatnik — 2021-05-05T21:31:06Z
Created attachment 1822 Using 10GB after only 5 minutes of running VisualD. Even in a smallish project (~5000 lines), the semantic server eats up an absolute shedload of RAM. It makes my machine unusable. There seems to be no limit to the amount of memory it uses, I've had it as high as 10GB (see attachment). There's a memory leak (or 20) in there somewhere. This doesn't always happen. Sometimes it can go for hours and never use more than 500MB (which is still not great, but is at least acceptable for me). But more often than not, there seems to be some sort of "inflection point" after which the memory usage just grows very quickly and doesn't drop back. Please let me know how I can help track this down and solve it. It's extremely important to me that this gets resolved. Right now I have to restart visual studio every 2 hours because of this.
Comment #1 by r.sagitario — 2021-11-29T08:36:49Z
hopefully fixed by building the server with dmd instead of LDC (the latter doesn't support precise scanning of the DATA segment) in https://github.com/dlang/visuald/releases/tag/v1.2.0-rc1 In addition, there is now an option to wipe most data if some memory threshold is exceeded.
Comment #2 by torhu — 2022-09-21T01:36:09Z
I have had DMD Semantic Server grow to over ten GB at least twice in a week now. Using VisualD 1.3.0 with VS 2022 Community. I am using VisualD for debugging a project that links with DWT (current master), and is built with DMD 2.094.2, if that helps. If this happens again, I suppose can try the option to restart DMDSS.