Samba 2.0.7 mem leaks, continued
Teemu Junnila (QRA)
Teemu.Junnila at era.ericsson.se
Mon Sep 4 07:19:27 GMT 2000
The symptom is very much the same with samba 2.0.7 compiled with gcc2.95.2 on Solaris 7.
My only way to survive for the moment is to once every night kill and restart samba.
From: acherry at pobox.com [mailto:acherry at pobox.com]
Sent: den 2 september 2000 18:35
To: samba-technical at samba.org
Subject: Samba 2.0.7 mem leaks, continued
I've done a bit more investigation regarding our memory problems with
Samba 2.0.7 under Solaris 2.6. Going through some process accounting
logs I've been keeping, it looks pretty clear that there is some
memory leakage going on. Some things to note:
Going through the logs, I see the size of ALL smbd processes gradually
increasing, which implies that the parent process is the one that is
growing. Moreover, the growth happened over the weekend, when not
many people were working -- however, I *was* tweaking some of the smb
configs and sending HUP signals to the parent smbd process to re-read
the smb.conf files.
Below is some output from the memory checking functions of dbx. To do
this, I preloaded the appropriate library in the smbd startup script.
Since dbx seems to require that the process being checked end normally
(i.e. not be killed) in order to gather its data, I had to attach it
to the parent process, set it to follow children, and then open up a
session. During this session I sent several HUPs to the child
process, as well as doing various other operations (running
applications, loading/saving files, etc). I then exited the session
to get dbx to return its stats. I've included the results below. I'm
not all that familiar with Samba's internals yet, but it appears to
suggest a leak in the config file reloading code, particularly the
(new as of 2.0.7) hash-based stat_cache code. This would be
consistent with the symptoms I'm seeing.
Hope this is helpful. If I get a chance to look at things in more
detail I'll send another note -- I'm using a debug build of Samba to
do this testing, so I might be able to gather more info.
BTW, the version I'm using right now is built with Sun WorkShop 5.0
(since dbx needs that in order to do the leak checking)... if that
makes a difference.
UNIX System Admin
Cummins Engine Company
More information about the samba-technical