Memory leaks in smbd ?
Jeremy Allison
jra at samba.org
Wed Nov 19 23:14:17 GMT 2008
On Tue, Nov 18, 2008 at 02:54:08PM +0100, Martin Zielinski wrote:
> Jeremy Allison schrieb:
>> On Sat, Nov 15, 2008 at 02:03:05PM +0100, Martin Zielinski wrote:
>>
>>> We tried to reproduce the error, which is quite complex having a
>>> printer window open and polling a non-empty printer on the samba
>>> server.
>>>
>>> With your patch, the samu struct now is only once in the smbcontrol
>>> output. So yes, I would say it's fixed. There are still several
>>> "Printer Entry" entries, that seem not to be freed, too - but that's
>>> not so much memory that it will become a problem.
>>
>> I'd still like to nail those if they are leaks though. Can you
>> give me any more info on the pool useage there ?
>>
>> Jeremy.
>>
> Hi Jeremy,
>
> We tried to reproduce the situation caused the first post about a memory
> leak. My colleague told me, that it is necessary to have a printer
> window open displaying several print jobs.
>
> I've attached the gzipped 26k file. If it doesn't make it to the list, I
> could resend it to you personally.
>
> Compared to the first post we had *before* Volkers patch lots of:
>
> Printer Entry [-40000784] contains 26 bytes in 2 blocks
> .name contains 26 bytes in 1
> struct samu contains 543 bytes in 26 blocks
> struct passwd contains 71 bytes in 6
> [...]
>
> and now we only have
>
> Printer Entry [-40000784] contains 26 bytes in 2 blocks
> .name contains 26 bytes
> Printer Entry [-40000784] contains 26 bytes in 2 blocks
> .name contains 26 bytes in 1
> Printer Entry [-40000784] contains 26 bytes in 2 blocks
> .name contains 26 bytes in 1
> [...]
>
> If these entries are a leak I can't say - but you will know.
They don't look like leaks to me. Each "Printer Entry [-40000784]"
is a policy handle on a printer open on a specific pipe. You only
have 15 of them currently open in this log so this doesn't seem
too many (IMHO). They're all kept track of and will be closed if
the pipe or specific handle is closed.
Jeremy.
More information about the samba-technical
mailing list