RabbitMQ/Windows phantom memory issue

Loïc Hoguin lhoguin@REDACTED
Tue Sep 28 11:56:17 CEST 2021


I am looking for about 5GB of used binary memory that is missing.

I can see the memory used when looking at memory allocators:


The allocators do not appear to be fragmented:





So I would expect this memory to be used by something in the system.

I have looked at processes (memory, old/new heaps): nothing.

recon:bin_leak(40): nothing? The processes found don’t hold much memory.


recon:proc_count(binary_memory, 40): nothing.


Ports all seem to use the same amount of memory.

Ets/Mnesia tables: nothing. There aren’t that many and they’re all below 12MB.

Persistent terms: nothing.


#{count => 56,memory => 27536}

We do not use atomics to store binaries.

Am I missing something? Any tips to figure out what is going on?

This happens with two RabbitMQ customers using Windows
(2012 and 2016) with a recent RabbitMQ version.

This only started happening after moving to a newer RabbitMQ version
and seems unrelated to the OTP version. But it might be a bug triggered
by a new behavior in RabbitMQ. I would be happy to put the blame on
RabbitMQ but I cannot find where this leaking binary memory is used.

I can share crash dumps with OTP team from a test environment that
shows the same symptoms, but leaks less memory because the nodes
are not used as much (so the numbers differ but there’s still memory
not accounted for).

The problem happens both on mostly idle and busy nodes, with busy
nodes losing track of memory quicker.

I will try to reproduce this on a local environment as time allows.


Loïc Hoguin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210928/2fb547f9/attachment.htm>

More information about the erlang-questions mailing list