Debug SMBD memory leak/usage

Timur I. Bakeyev timur at freebsd.org
Tue Mar 6 18:40:40 UTC 2018


On 6 March 2018 at 18:15, Richard Sharpe <realrichardsharpe at gmail.com>
wrote:

> On Tue, Mar 6, 2018 at 7:26 AM, Timur I. Bakeyev via samba-technical
> <samba-technical at lists.samba.org> wrote:
> > On 6 March 2018 at 07:30, Ralph Böhme <slow at samba.org> 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
> >> -DENABLE_DMALLOC
> >> > 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_CFLAGS="-DENABLE_DMALLOC" \
> >> 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.
>

There is at least one recent post
https://lists.samba.org/archive/samba/2017-December/212577.html
that seems refers to the same or similar problem... But as usual,
reproducing the issue is the
hardest and biggest part of fixing the issue.

With regards,
Timur Bakeyev.


More information about the samba-technical mailing list