dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

untracked memory or a leak

Open romange opened this issue 1 year ago • 2 comments

A dragonfly process slowly grows in RSS while used memory stays stable. See the attached files:

info log + arena logs: info_all_101208.txt arena_101208.txt arena_backing_101208.txt

The process uses 16 threads. These show that the leakage is in the backing arena. Further analysis shows that most of the arena memory is spent on allocations with sizes higher than 3000.

Allocation tracking of memory track add 3000 20000 1 jdbfly.txt.tar.gz

More investigations is needed.

romange avatar Jul 19 '24 15:07 romange

My working assumption is that we do not track/clean up redis parser memory. I see lots of memory allocations coming from there. maybe even we have a bug that causes the parser to allocate more and more.

romange avatar Jul 19 '24 15:07 romange

It seems that we track redis parser correctly. I am attaching more allocation logs but now it seems more and more like a leak.

alloc_log.txt.gz

romange avatar Jul 20 '24 15:07 romange

Just thought I'd mention that I'm seeing this in production on v1.22.1. Virtual memory steadily grows over time (in blocks), while real memory usage stays relatively stable.

image image

alistairjevans avatar Nov 07 '24 14:11 alistairjevans

Can you please run redis-cli debug exec | wc -l ?

romange avatar Nov 07 '24 17:11 romange

has been fixed in 1.24.

romange avatar Nov 14 '24 14:11 romange