On Mon, 17 Apr 2017 16:22:31 GMT, punkUser wrote:

Hey guys,

I'm having a bit of pain with a production system running out of memory periodically - I suspect some sort of leak or GC issue but it's hard to pin down. Do you guys have recommendations of tools or APIs (vibe fiber aware ideally) to use to keep track of live fibers, allocations or memory usage on the fly?

Despite calling GC.collect/minimize periodically virtual memory in Ubuntu rises to very large values and eventually resident gets large enough that an allocation fails once swap is exhausted.

Thanks in advance!

Unfortunately the GC is quite a pain point. dmd -vgc/dub -b profile-gc helps somewhat to find possible sources, but since it only accumulates allocations and ignores freed/collected memory, the numbers are not really suited to find memory leaks.

For the general fiber/task topic, I started to implement a graphical debugger that can be used to keep track of various forms of resource use, connecting it to the active tasks. It also shows the live fiber scheduling to make it possible to detect synchronization/timing issues.

Unfortunately it is not ready for general consumption and I had to put it on the back burner due to a general time shortage.

I've heard that valgrind can also be somewhat useful in this scenario, but I didn't try to use it with D so far.