Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th May 2011, 17:33
Djamu Djamu is offline
Member
 
Join Date: Sep 2007
Posts: 51
Thanks: 2
Thanked 13 Times in 7 Posts
Default saslauthd memory leak > fix

This is an old issue that still isn't resolved on debian & derivates ( others ? )
maybe someone should include it in the howtos.

issue:
saslauthd's memory usage starts to climb handling invalid authentication requests, eventually eating all your server memory ( & swap ).
this is in fact a very serious issue, as it facilitates (D)DOS attacks by someone sending lots of crap auth. requests until the OOM process killer kicks in.


there's an easy workaround by changing /etc/default/saslauthd
Code:
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
to
Code:
OPTIONS="-n 0 -c -m /var/spool/postfix/var/run/saslauthd -r"
adding "-n 0" effectively prevents the saslauthd daemon from using thread processes by using forks instead.
( on 1 of my servers it used up 8GB and 16GB swap.... which was freed up instantaneously upon changing the config and invoking /etc/init.d/saslauthd restart )

if anybody has a better solution.. feel free to post



my 5 cents
__________________
Windows, the only virus you pay for

Last edited by Djamu; 19th May 2011 at 17:42.
Reply With Quote
The Following 5 Users Say Thank You to Djamu For This Useful Post:
bharathchari (7th September 2011), Bicet (11th July 2011), erosbk (19th May 2011), falko (20th May 2011), Sir Henry (9th September 2014)
Sponsored Links
  #2  
Old 2nd September 2014, 07:24
falcon7700 falcon7700 is offline
Junior Member
 
Join Date: Jun 2011
Location: Amherst, MA
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default (bump) Still a problem on Debian Squeeze

Recently ran into this problem on a "Prefect Server" built on Squeeze.

So, thanks again for the solution ;-)
Reply With Quote
  #3  
Old 9th September 2014, 09:50
Sir Henry Sir Henry is offline
Member
 
Join Date: Jan 2012
Posts: 53
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Thank you, this is indeed still a problem with the current version on Debian Squeeze. Look at the yearly memory graph, it is very interesting. The server stalled when the committed memory exceeded the available physical RAM (8GB) plus swap (2GB). This leak went unnoticed (*blush*) for one year to crash at last.

I found the culprit by adding another graph showing memory usage by process. Problem now solved with the no-thread option.
Attached Images
 
__________________
Cheers, Sir Henry

Last edited by Sir Henry; 9th September 2014 at 09:54.
Reply With Quote
  #4  
Old 9th September 2014, 18:13
webguyz webguyz is online now
Senior Member
 
Join Date: Oct 2012
Location: Earth
Posts: 114
Thanks: 35
Thanked 15 Times in 12 Posts
Default

Hmm. I don't have a /etc/default/saslauthd file, but I am using ISPConfig aand Postfix and I do see sasl auths going on in my mail.log so I mus be using it.

Is there an alternate location it might be in?

Thanks!
__________________
= WebGuyz.Net =
VPS and Web Hosting
Reply With Quote
  #5  
Old 9th September 2014, 18:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,533 Times in 4,351 Posts
Default

If you use dovecot, then postfix is authenticating against dovecot and not saslauthd. saslauthd is used on courier setups.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
webguyz (9th September 2014)
  #6  
Old 9th September 2014, 19:01
Sir Henry Sir Henry is offline
Member
 
Join Date: Jan 2012
Posts: 53
Thanks: 1
Thanked 5 Times in 5 Posts
 
Default

Depending on your distribution this could also be in /etc/saslauthd.conf.
__________________
Cheers, Sir Henry
Reply With Quote
Reply

Bookmarks

Tags
saslauthd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak problem cronjob (server.sh/server.php) zsirmo General 2 1st November 2010 14:06
postfix saslauthd, Please! help (going nuts) telmathedog HOWTO-Related Questions 7 2nd September 2010 11:53
Need some Hints to "The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3]" wahid HOWTO-Related Questions 10 25th August 2010 16:18
No run directory defined for saslauthd, not starting sbin Server Operation 1 30th January 2010 04:06
Memory leak? oom-killer problem yikes! Stokesy Server Operation 7 29th July 2006 13:48


All times are GMT +2. The time now is 07:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.