Re: (SAMBA) issue with filehandles being released under 6.1-RELEASE?

2006-11-13 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bill Moran wrote:
> In response to Lowell Gilbert <[EMAIL PROTECTED]>:
> 
>> Garrett Cooper <[EMAIL PROTECTED]> writes:
>>
>>> Just wondering if anyone else was experiencing the same issues that I
>>> am.. it's related to Samba-3.0.22c and sockets / filehandles.
>>>
>>> For some odd reason every couple days (~2 days) I have to restart the
>>> smbd daemon because it eats up 6000+ filehandles, just for sockets I
>>> assume (based on netstat output). At the point where it reaches 8000
>>> some filehandles open, the system refuses to fork, forcing me to login
>>> as root on the console directly instead of via SSH.
>>>
>>> My machine is a local / preferred master (smbd fights with XP Home
>>> clients because they want to be master browsers), with limited access
>>> to a few XP clients (<4 clients at any given point in time), plus an
>>> XBox using smbclient with XBox Media Center.
> 
> Have you investigated the possibility that Samba legitimately needs more
> filehandles than that?  Even if there are only 4 clients, they may be
> opening 2000 files each (The output of smbstatus right before the system
> exhausted its filehandles would be interesting)  If that's the case, you
> can update the amount of available filehandles using sysctl or by
> recompiling your kernel.
> 
> We have some PostgreSQL servers that require the filehandle limit be raised
> to 5, for example.

Will give that a thought--thanks!
- -Garrett

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFWMtF6CkrZkzMC68RAu37AJ94ynYimAmz7u5wJTsYqJPWD4hyUgCfcHun
PK7vUcytITYlRmfunW68qHU=
=Pfsj
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: (SAMBA) issue with filehandles being released under 6.1-RELEASE?

2006-11-13 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lowell Gilbert wrote:
> Garrett Cooper <[EMAIL PROTECTED]> writes:
> 
>> Just wondering if anyone else was experiencing the same issues that I
>> am.. it's related to Samba-3.0.22c and sockets / filehandles.
>>
>> For some odd reason every couple days (~2 days) I have to restart the
>> smbd daemon because it eats up 6000+ filehandles, just for sockets I
>> assume (based on netstat output). At the point where it reaches 8000
>> some filehandles open, the system refuses to fork, forcing me to login
>> as root on the console directly instead of via SSH.
>>
>> My machine is a local / preferred master (smbd fights with XP Home
>> clients because they want to be master browsers), with limited access
>> to a few XP clients (<4 clients at any given point in time), plus an
>> XBox using smbclient with XBox Media Center.
>>
>> Helpful info:
>> [EMAIL PROTECTED] /home/gcooper]# uname -a
>> FreeBSD hoover.localdomain 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #9:
>> Mon Oct 16 02:14:29 PDT 2006
>> [EMAIL PROTECTED]:/usr/obj/usr/src/sys/HOOVER  i386
>>
>>
>> /usr/local/etc/smb.conf:
>> [global]
>>   workgroup = WORKGROUP
>>   encrypt passwords = yes
>>   log file = /var/log/samba/log.%m
>>   log level = 3 passdb:4 auth:4
>> #   log level = 5
>>   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>>   local master =  yes
>>   preferred master = yes
>>   dns proxy = no
>>   guest ok = no
>>
>> [shared]
>>   path = /shared
>>   writeable = yes
>>   public = yes
>>   hosts deny = shiina pinocchio
>>   guest ok = no
>>   create mask = 0775
>>
>> The only changes that I've made to smb.conf between now and when I
>> last accessed samba is that I've removed an unneeded share and removed
>> guest advertisement for my shares (need password / username anyhow to
>> login, so I figured I might as well..).
> 
> This is a Samba issue, not an OS issue, as demonstrated by the fact
> that the system is able to close all of the handles when the daemon 
> is shut down.  
> 
> Have you looked closely at the netstat output to which you referred?
> It would be interesting if all of the stuck connections were coming
> from the same host, or were in a particular state, etc.

I actually went in depth looking at the code for a long period of time
and it appears that it's expected for the smbd daemon to keep on
malloc'ing file descriptors (in this case sockets) until it can no
longer allocate file descriptors. Then it cleans house on all of the
file descriptors to reclaim them for itself.

That doesn't seem to free up resources for the OS though--or at least
it wasn't obvious when looking through the code, but maybe the sockets
reclaim themselves due to the implementation of sockets... Needless to
say this problem is new (since 3.0.22x at least), but then again I've
never really had XP clients connecting to my FreeBSD box en-masse like
this before. Usually I shared via SMB with my strictly my XP dualboot
client and the xbox I have in my possession.

My bug report that I made for this (closed it because I thought the
problem was resolved--process allocation) is:
.
- -Garrett
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFWMpl6CkrZkzMC68RAkbPAJ44GsTfcyOj9zEFV9oCXFGzq7tHKwCeKqO0
HoLa/My3E5FVgzqnmF40CU8=
=ZA7e
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: (SAMBA) issue with filehandles being released under 6.1-RELEASE?

2006-11-13 Thread Bill Moran
In response to Lowell Gilbert <[EMAIL PROTECTED]>:

> Garrett Cooper <[EMAIL PROTECTED]> writes:
> 
> > Just wondering if anyone else was experiencing the same issues that I
> > am.. it's related to Samba-3.0.22c and sockets / filehandles.
> >
> > For some odd reason every couple days (~2 days) I have to restart the
> > smbd daemon because it eats up 6000+ filehandles, just for sockets I
> > assume (based on netstat output). At the point where it reaches 8000
> > some filehandles open, the system refuses to fork, forcing me to login
> > as root on the console directly instead of via SSH.
> >
> > My machine is a local / preferred master (smbd fights with XP Home
> > clients because they want to be master browsers), with limited access
> > to a few XP clients (<4 clients at any given point in time), plus an
> > XBox using smbclient with XBox Media Center.

Have you investigated the possibility that Samba legitimately needs more
filehandles than that?  Even if there are only 4 clients, they may be
opening 2000 files each (The output of smbstatus right before the system
exhausted its filehandles would be interesting)  If that's the case, you
can update the amount of available filehandles using sysctl or by
recompiling your kernel.

We have some PostgreSQL servers that require the filehandle limit be raised
to 5, for example.

-- 
Bill Moran
Collaborative Fusion Inc.



IMPORTANT: This message contains confidential information and is intended only 
for the individual named. If the reader of this message is not an intended 
recipient (or the individual responsible for the delivery of this message to an 
intended recipient), please be advised that any re-use, dissemination, 
distribution or copying of this message is prohibited.  Please notify the 
sender immediately by e-mail if you have received this e-mail by mistake and 
delete this e-mail from your system.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: (SAMBA) issue with filehandles being released under 6.1-RELEASE?

2006-11-13 Thread Lowell Gilbert
Garrett Cooper <[EMAIL PROTECTED]> writes:

> Just wondering if anyone else was experiencing the same issues that I
> am.. it's related to Samba-3.0.22c and sockets / filehandles.
>
> For some odd reason every couple days (~2 days) I have to restart the
> smbd daemon because it eats up 6000+ filehandles, just for sockets I
> assume (based on netstat output). At the point where it reaches 8000
> some filehandles open, the system refuses to fork, forcing me to login
> as root on the console directly instead of via SSH.
>
> My machine is a local / preferred master (smbd fights with XP Home
> clients because they want to be master browsers), with limited access
> to a few XP clients (<4 clients at any given point in time), plus an
> XBox using smbclient with XBox Media Center.
>
> Helpful info:
> [EMAIL PROTECTED] /home/gcooper]# uname -a
> FreeBSD hoover.localdomain 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #9:
> Mon Oct 16 02:14:29 PDT 2006
> [EMAIL PROTECTED]:/usr/obj/usr/src/sys/HOOVER  i386
>
>
> /usr/local/etc/smb.conf:
> [global]
>   workgroup = WORKGROUP
>   encrypt passwords = yes
>   log file = /var/log/samba/log.%m
>   log level = 3 passdb:4 auth:4
> #   log level = 5
>   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>   local master =  yes
>   preferred master = yes
>   dns proxy = no
>   guest ok = no
>
> [shared]
>   path = /shared
>   writeable = yes
>   public = yes
>   hosts deny = shiina pinocchio
>   guest ok = no
>   create mask = 0775
>
> The only changes that I've made to smb.conf between now and when I
> last accessed samba is that I've removed an unneeded share and removed
> guest advertisement for my shares (need password / username anyhow to
> login, so I figured I might as well..).

This is a Samba issue, not an OS issue, as demonstrated by the fact
that the system is able to close all of the handles when the daemon 
is shut down.  

Have you looked closely at the netstat output to which you referred?
It would be interesting if all of the stuck connections were coming
from the same host, or were in a particular state, etc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Issue with filehandles being released under 6.1-RELEASE?

2006-11-10 Thread Garrett Cooper
Just wondering if anyone else was experiencing the same issues that I 
am.. it's related to Samba-3.0.22c and sockets / filehandles.


For some odd reason every couple days (~2 days) I have to restart the 
smbd daemon because it eats up 6000+ filehandles, just for sockets I 
assume (based on netstat output). At the point where it reaches 8000 
some filehandles open, the system refuses to fork, forcing me to login 
as root on the console directly instead of via SSH.


My machine is a local / preferred master (smbd fights with XP Home 
clients because they want to be master browsers), with limited access to 
a few XP clients (<4 clients at any given point in time), plus an XBox 
using smbclient with XBox Media Center.


Helpful info:
[EMAIL PROTECTED] /home/gcooper]# uname -a
FreeBSD hoover.localdomain 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #9: 
Mon Oct 16 02:14:29 PDT 2006 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/HOOVER  i386



/usr/local/etc/smb.conf:
[global]
  workgroup = WORKGROUP
  encrypt passwords = yes
  log file = /var/log/samba/log.%m
  log level = 3 passdb:4 auth:4
#   log level = 5
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  local master =  yes
  preferred master = yes
  dns proxy = no
  guest ok = no

[shared]
  path = /shared
  writeable = yes
  public = yes
  hosts deny = shiina pinocchio
  guest ok = no
  create mask = 0775

The only changes that I've made to smb.conf between now and when I last 
accessed samba is that I've removed an unneeded share and removed guest 
advertisement for my shares (need password / username anyhow to login, 
so I figured I might as well..).


TIA,
-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"