winbind 3.3.7 memory usage

Dave Daugherty dave.daugherty at
Wed Oct 7 11:41:25 MDT 2009

Dr. Maurer,

May I ask what OS platform and version you are running Samba on?  I see glibc_2.2.5 in the stack trace.

It seems a little odd that getgrnam_r would be allocating memory, since it is given a buffer to stuff things into.  

We also use this function and I would like to test ourselves.


Dave Daugherty
Centrify Corp.


Sent: Tuesday, October 06, 2009 11:55 PM
To: Danilo Almeida; Volker.Lendecke at SerNet.DE
Cc: samba-technical at
Subject: AW: winbind 3.3.7 memory usage

Hi Danilo,

bingo, very good point.

The unix systems are integrated into AD using Vintella Authentication Services from Quest.
Therefore they use the vas nss module in /etc/nsswitch.conf

Sorry, I did not include this information in the initial mail, but I did not realize,
that this might be relevant.

I will open a call by quest and inform the list, when they find a solution in order to document
the problem.

Thank you very much




----- Originalnachricht -----
Von: Danilo Almeida <dalmeida at>
Gesendet: Mit, 7.10.2009 07:32
An: Dr. Hansjoerg Maurer <hansjoerg.maurer at> ; Volker.Lendecke at SerNet.DE
Cc: samba-technical at
Betreff: RE: winbind  3.3.7 memory usage


<quote from="Volker">
The only significant memory leak as reported by valgrind is
in the idmap child:

==14502== 83,415 bytes in 4,020 blocks are definitely lost in loss record 61 of 67
==14502==    at 0x4904A06: malloc (vg_replace_malloc.c:149)
==14502==    by 0x3B8E570FF1: strdup (in /lib64/tls/
==14502==    by 0x14A71A61: ???
==14502==    by 0x14A7EBA4: ???
==14502==    by 0x14A85CAC: ???
==14502==    by 0x14A864F0: ???
==14502==    by 0x14A81CAD: ???
==14502==    by 0x147C51A7: ???
==14502==    by 0x147C7294: ???
==14502==    by 0x3B8E58E75E: getgrnam_r@@GLIBC_2.2.5 (in /lib64/tls/
==14502==    by 0x3B8E58DDBE: getgrnam (in /lib64/tls/
==14502==    by 0x391938: ??? (idmap_nss.c:189)
==14502==    by 0x387E72: idmap_backends_sid_to_unixid (idmap.c:785)
==14502==    by 0x388F0C: idmap_sid_to_gid (idmap_util.c:259)
==14502==    by 0xBFBE7: winbindd_dual_sid2gid (winbindd_idmap.c:374)
==14502==    by 0xB71B8: ??? (winbindd_dual.c:453)
==14502==    by 0xB7971: ??? (winbindd_dual.c:214)
==14502==    by 0xB7E2E: ??? (winbindd_dual.c:189)
==14502==    by 0x1445CB: run_events (events.c:233)
==14502==    by 0x85961: main (winbindd.c:850)

It seems that on your system getgrnam internally leaks
memory. There's nothing Samba can do about this.

This might be a nsswitch module.  You might try looking at what modules you have in /etc/nsswitch.conf for groups and see if that might point you in the right direction.  If you have a non-default module, that might be the first one to investigate.

- Danilo

More information about the samba-technical mailing list