Subject: Re: smbd dies under heavy transfers
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Gilles Gravier <Gilles@Gravier.org>
List: netbsd-users
Date: 04/15/2007 21:43:16
OK... So I ran the test again... and this time, here is an interesting 
error message I got in my server log:

[2007/04/15 21:36:10, 8] smbd/dosmode.c:dos_mode(377)
  dos_mode: Media/MP3/Unknown Artist/Television's Greatest Hits Volume 
1/22 The Donna Reed Show.mp3
[2007/04/15 21:36:10, 8] smbd/dosmode.c:dos_mode_from_sbuf(193)
  dos_mode_from_sbuf returning a
[2007/04/15 21:36:10, 8] smbd/dosmode.c:dos_mode(415)
  dos_mode returning a
[2007/04/15 21:36:10, 0] lib/util.c:Realloc(1036)
  Memory allocation error: failed to expand to 4136 bytes
[2007/04/15 21:36:10, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(3047) cmd=50 (SMBtrans2) NT_STATUS_NO_MEMORY
[2007/04/15 21:36:10, 5] lib/util.c:show_msg(485)
[2007/04/15 21:36:10, 5] lib/util.c:show_msg(495)
  size=35
  smb_com=0x32
  smb_rcls=23
  smb_reh=0
  smb_err=49152
  smb_flg=136
  smb_flg2=51265
  smb_tid=1
  smb_pid=10872
  smb_uid=101
  smb_mid=43781
  smt_wct=0
  smb_bcc=0

Sooo... Seems smbd is running out of memory. But I get no "out of 
memory" errors on the system console. So could it be running out of 
allocated memory (in which case, is there a kernel parameter that I can 
set to enable more memory per process)?

Thanks,
Gilles.

Manuel Bouyer wrote:
> On Sun, Apr 15, 2007 at 08:36:27PM +0200, Gilles Gravier wrote:
>   
>> Once I do this... do I just reboot? Or do I actually need to rebuild a 
>> kernel?
>>     
>
> Just run /etc/rc.d/sysctl start
>
>   
>> Gilles.
>>
>> Przemys?aw Pawe?czyk wrote:
>>     
>>> On Sun, 15 Apr 2007 17:44:24 +0200
>>> Gilles Gravier <Gilles@Gravier.org> wrote:
>>>
>>>  
>>>       
>>>> I had a look at /var/run/samba/smbd.log and found these entries at
>>>> the end:
>>>>
>>>> [2007/04/15 09:36:20, 1] smbd/files.c:file_init(195)
>>>>  file_init: Information only: requested 10000 open files, 1752 are
>>>> available.
>>>>    
>>>>         
>>> Try this in file /etc/sysctl.conf:
>>> #!/sbin/sysctl -f
>>> #
>>> # $NetBSD: sysctl.conf,v 1.5 2003/11/03 15:12:06 briggs Exp $
>>> #
>>> # sysctl(8) variables to set at boot time.
>>>
>>> # Default core name template:
>>> #kern.defcorename=%n.core
>>>
>>> # Number of kernel threads to use for NFS client
>>> #vfs.nfs.iothreads=4
>>> vfs.generic.usermount=1
>>> kern.maxfiles=10000
>>> kern.maxproc=1024
>>>
>>> Regards,
>>> p2o2
>>> --
>>> Przemys?aw (p2o2) Pawe?czyk <pp_o2@o2.pl>
>>> The LearN@BSD Project: http://pp.kv.net.pl
>>>  
>>>       
>> -- 
>> /*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
>> *=* *http://www.gravier.org/*
>> ICQ : *77488526* 
>> <http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
>> Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
>> *Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
>> <http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
>> <aim:goim?screenname=gillesgravier>
>> PGP Key ID : *0x8DE6D026* 
>> <http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
>> "Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
>> "De toutes les aberrations sexuelles, la chasteté est la plus 
>> aberrante." [Anatole France]
>>     
>
>   

-- 
/*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
*=* *http://www.gravier.org/*
ICQ : *77488526* 
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
<aim:goim?screenname=gillesgravier>
PGP Key ID : *0x8DE6D026* 
<http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus 
aberrante." [Anatole France]