[Samba] Duplicate PID

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Mar 23 01:14:26 MDT 2014

On Mon, Feb 24, 2014 at 07:04:13PM +0200, Einat Ben Ezra wrote:
> Hi,
> I'm using samba version 3.0.37 and i encountered a very strange and
> annoying phenomena
> when 2 different users from 2 different machines are getting the same PID
> from samba.
> (2 windows users that are trying to view documents on the CIFS share).
> I did some google research on this problem and i found the following
> regarding such a problem:
> "
> One can find references to problems like this, possibly affecting
> performance, back in 2001
> http://lists.samba.org/archive/samba-technical/2001-September/015658.html.
> I experience that also on an RHEL6 samba server. Is %CPU for pid 17666
> exceptionally high? If you look at the full smbstatus - do you see other
> users with the same PID as user toor? List open files for the process with
> lsof -p 17666 and verify if toor opens other user's files.
> There are at least two theories what is causing this: 1. samba sometimes
> does not update it's state when clients are disconnected
> http://samba.2283325.n4.nabble.com/Closing-sessions-and-smbstatus-td2447307.html2.
> file locking (when one user accesses files of another user)
> https://bugzilla.samba.org/show_bug.cgi?id=8722
> "
> *My questions are:*
> 1.Can someone please throw a light on the problem? explain why this can
> happen?
> 2. How can i avoid such a problem of duplicate PID?
> 3. Is there any workaround for such a problem?  - for now i cannot upgrade
> my samba version - it is not an option for me.
> 4. How can i identify this problem in samba logs - log.smbd . etc?

It's extremely unlikely that two smbds share a pid. This
would be a severe unix kernel bug. It's more likely that an
smbd dies and another long-running daemon has taken over the
pid of a formerly existing smbd. Later Samba versions have
added provisions to detect this properly and clean up the
stale entries the crashed smbd has left behind. Someone
could be paid to port back those changes, but that would
mean that your 3.0.x version will become GPLv3.

Hope that helps,


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba mailing list