Samba 3.5.8 leaks memory in DEBUG (dbghdrclass)

Jeremy Allison jra at
Thu Dec 1 11:54:29 MST 2011

On Thu, Dec 01, 2011 at 08:20:06AM +0000, Dina_Fine at wrote:
> Hello Jeremy
> The leak will not be noticeable for the main samba flow customers.
> You see, we added additional samba processes (forked from the parent) which monitors the samba children death and will clean the clients state (byte-range locks, oplocks and such) in our distributed file system.
> This process will display a message on every dead samba child process.
> So the test which caused the below bug to leak a lot of memory is to run in loop cifs mount command with a non-existing user to a non-existing share (samba creates a new samba child processes for each mount attempt)
> But the bug will be noticeable for us not only in the above scenario.
> We have diagnostic procedure on our customers clusters. The customer can execute diagnostic command from the cluster CLI. The diagnostic will set a high debug level on samba processes, will take tcpdumps, strace when needed and such and then will send all the log files/traces to us.
> In such a case when samba debug level is high, a *lot* of messages are printed to the log and memory leaks very fast.

Ah, ok - so it's caused by your vendor customization.

Phew :-). Thought we might have had a generic leak there
for a minute :-).

As that code has been changed for 3.6.x, and isn't a problem
in the generic 3.5.x I'm not going to push that change
back to 3.5.x.

Thanks for reporting though, much appreciated !


More information about the samba-technical mailing list