On Wed, 22 Mar 2006, Joshua Sandbrook wrote:

Just today I found my openbsd server curiously stalled... not completely
dead, could switch consoles, ping it.. but otherwise unresponsive.

Found out that smbd was eating huge amounts of memory, and I put the crash
down to smbd.

I applied ( by hand, patch did not work ) the patches Paul wrote..

Yeah. I was having issues with my mail client (silly line wrapping
and general corruption). There is a much cleaner patch offered
(against -current) on the tech list:

  http://marc.theaimsgroup.com/?l=openbsd-tech&m=114275248318690&w=2

This one should work if run through patch. Don't know if it will apply
against a 3.8 source tree, but I did test to ensure that it worked
from the mailing list against -current. If it doesn't apply, please let me know, and I'll be happy to clean it up and try again.

and now
smbd is behaving in a more sane fashion, though still seems to be very
slowly climbing in memory useage, though nothing like it was before.

It was climbing at around 1Mb of ram per second before hand, now it is
only using 6mb of ram ( started at 2.7 ish mb of ram ) according to top.

That's about what I was experiencing, too. Leakage much worse if the
directories were highly populated, but still slow leakage for
smaller dirs, too. After the patch, some transitory memory usage,
but typically it remains stable for me.

So either there is still some memory leakage in telldir and friends, or
smbd has other memory leaks in it, or this is just normal behaviour for
smbd.

I concentrated on the biggest culprit in my particular install. I'm quite sure that smbd probably leaks in other places, too, and I
may not have caught all places in dirent that may leak if used ...
"oddly". Perhaps I should go on another hunt if there is interest in
the community.

But the patch definately put a stop on the rapid memory consumtion.

Glad it was useful to someone!

Thanks Paul

Most welcome. Hopefully the openbsd guys will provide feedback on
it when they find some time, especially if it needs any further work to get it acceptable for inclusion into 3.9.

Cheers,
 - Paul

Reply via email to