Debug SMBD memory leak/usage

Richard Sharpe realrichardsharpe at
Tue Mar 6 17:15:58 UTC 2018

On Tue, Mar 6, 2018 at 7:26 AM, Timur I. Bakeyev via samba-technical
<samba-technical at> wrote:
> On 6 March 2018 at 07:30, Ralph Böhme <slow at> wrote:
>> Howdy,
>> On Tue, Mar 06, 2018 at 04:29:41AM +0100, Timur I. Bakeyev via
>> samba-technical wrote:
>> > I guess I haven't done that for quite a while, as '--enable-dmalloc'
>> option
>> > from Samba 3.x has disappeared in Samba .4.x and supplying
>> > to CFLAGS doesn't add -ldmalloc to the list of libs to link with and
>> hence
>> > Samba build fails.
>> never used dmalloc and completely untested, but what about:
>> ADDITIONAL_LDFLAGS="-ldmalloc" \
>> ./configure ...
>> The ADDITIONAL_* environment variables can be used to pass flags that are
>> used
>> during compilation, but not for configure checks.
> Thanks, Ralph! That actually did the trick and I got the the binaries
> linked with dmalloc.

I remember seeing issues with Samba on FreeBSD and memory consumption.

>From what I recall, one of the issues seemed to be that TDBs that were
volatile would grow continuously all the way up to the 2GB VM that was
set aside for them because the free list never seemed to be purged or
reused, or something like that.

My memory is hazy now because I have not worked on Samba on FreeBSD
for a number of years.

Richard Sharpe

More information about the samba-technical mailing list