[Samba] Possible memory leak in

Matt Oursbourn moursbourn at gmail.com
Thu Sep 9 21:38:34 UTC 2021


I have an issue where samba is not freeing memory. When I start a large
file transfer over a 10Gb network samba jumps up to 20+GB ram usage pretty
quickly. Eventually It fills up all ram and swap and the kernel kills Samba.

from dmesg:

[ 7113.201532]

[ 7113.201583] Out of memory: Killed process 26636 (smbd)
total-vm:40121044kB, anon-rss:30378236kB, file-rss:0kB, shmem-rss:0kB,
UID:0 pgtables:63044kB oom_score_adj:0

[ 7113.335042] show_signal_msg: 13 callbacks suppressed

Even if the file transfer is able to finish, samba never releases the
memory so the next file causes the crash pretty quickly. The only way to
reclaim the ram is to restart samba.

I am running samba Version 4.11.6-Ubuntu on both computers.

This same process happens in Linux Mint 20.2 Cinnamon, Ubuntu 20.04.3 LTS
and Ubuntu 21.04

I can't figure out how to install samba-4.14.7 from the samba website to
test it.

I don't have anything about cache in my samba.comf

More information about the samba mailing list