Debug SMBD memory leak/usage
realrichardsharpe at gmail.com
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 lists.samba.org> wrote:
> On 6 March 2018 at 07:30, Ralph Böhme <slow at samba.org> wrote:
>> 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'
>> > 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
>> > 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
>> 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.
More information about the samba-technical