[Samba] Closing sessions and smbstatus

Jeremy Allison jra at samba.org
Tue Oct 21 00:26:11 GMT 2008


On Mon, Oct 20, 2008 at 10:03:46PM -0200, Norberto Bensa wrote:
> Quoting Jeremy Allison <jra at samba.org>:
>
>> When you find a process in this state attach using
>> strace -p <pid> (on Linux) to see what it's up to.
>
> norberto at archivo4:~$ sudo smbstatus
> Unknown parameter encountered: "change notify timeout"
> Ignoring unknown parameter "change notify timeout"
>
> Samba version 3.0.28a
> PID     Username      Group         Machine
> -------------------------------------------------------------------
>
> Service      pid     machine       Connected at
> -------------------------------------------------------
>
> Locked files:
> Pid          Uid        DenyMode   Access      R/W        Oplock          
>  SharePath   Name   Time
> --------------------------------------------------------------------------------------------------
> 747          4036       DENY_ALL   0x2019f     RDWR       NONE            
>  /home/mjoddone   .Correo/retina/addr2a3a.pmr   Thu Oct 16 17:44:15 2008
>
>
> norberto at archivo4:~$ sudo strace -p 747
> attach: ptrace(PTRACE_ATTACH, ...): No such process
>
>
> I have no stale sessions. My problem seems different (my memory seems to 
> be falling lately) I have stale locks.
>
> Is that normal?

Nope. The call process_exists_by_pid() should filter out
non-existant process id's before they get added into the
list.

In fact they are being so removed, which is why you
don't see them under the PID title above, and yet
the call to Ucrit_checkPid() is returning true for
some reason (which it shouldn't if the pid hasn't
been entered into the Ucrit_pid[] array).

Can you gdb and break at print_share_mode()
and see why the call at :

 if (Ucrit_checkPid(procid_to_pid(&e->pid)))

is returning "true" in your case ?

Jeremy.


More information about the samba mailing list