Subject: Re: Samba memory leak related to a still-open PR?
To: Mark Cullen <mark.r.cullen@gmail.com>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: netbsd-users
Date: 06/26/2006 12:17:35
On Mon, 26 Jun 2006, Mark Cullen wrote:
> Stephen Borrill wrote:
>> On Mon, 26 Jun 2006, Mark Cullen wrote:
>>
>>> I am experiencing a memory leak of some sorts related to Samba. I strongly
>>> believe it is related to the the PR [1] which is still 'Open'. I have run
>>> the included test program from the said PR, and I get the following
>>> output:
>>
>> I had a few email exchanges with Jeremy Allison about this back in October
>> last year, but I think my emails got swamped by all his other Samba-related
>> mails. :-)
>>
>> We don't see it at most sites which, at the time, I thought was down to
>> security = domain vs security = server (and Jeremy suggested there was a
>> passdb leak too). It was also not clear what triggered it (NetBSD
>> 1.6.2/Samba 3.0.10 was fine, NetBSD 2.0_STABLE/Samba 3.0.14 was not). It
>> was clear, however, it was a NetBSD-specific problem.
[snip]
> It is a rather odd problem indeed, and highly annoying! I'm actually using
> security = user, so I don't think it's that :-)
Actually, that's my bad. I mean user not server.
> It could of course be totally
> unrelated to this NetBSD bug, but the fact it's increasing with directory
> refreshes makes me want to guess it is. But then it's also very strange that
> everyone isn't experiencing this behaviour!
Well, the one site we are seeing it at is using a DOS Foxpro database on
the share (which manages to do record-level locking on a database which is
simply a shared file). I can't begin to imagine what weird things that
might be throwing at Samba.
> That's exactly what is happening with me. It grows and grows, and eventually
> it'll reach some kind of limit... and Samba will just plain stop responding
> to the clients requests filling the logs with:
[snip]
>
> Until I kill the offending smbd process (it happens on a sort of 'per-user'
> basis).
It's per-machine (which on a single-user machine is the same as per-user).
It's more complicated if you are using Terminal Services as all users
use the same connection to samba (and hence same smbd) unless you
apply a relevant hotfix and registry hack.
--
Stephen