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/16/2007 20:47:03
Thanks, Manuel!

Hum. OK. I guess I understand that.

But when I log in as root and type "ulimit" I get "unlimited".

So how do I assure that the smbd daemon (launched from the 
/etc/rc.d/samba script) gets unlimited memory?

Thanks,
Gilles.

Manuel Bouyer wrote:
> On Sun, Apr 15, 2007 at 09:43:16PM +0200, Gilles Gravier wrote:
>   
>> 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)?
>>     
>
> Yes, see 'ulimit' (sh) or "limit/unlimit" (csh). I guess you're running
> out of datasize.
>
>   

-- 
/*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]