Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109264 - courier-authlib-0.57-r1 got a memory leak
Summary: courier-authlib-0.57-r1 got a memory leak
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 156520 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-14 05:38 UTC by Erik Wasser
Modified: 2006-11-28 09:59 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
authvchkpw is not built if mysql or postgres aren't in USE (courier-authlib-0.58.ebuild.patch,203 bytes, patch)
2006-09-01 16:05 UTC, Alan Mosca
Details | Diff
authvchkpw is not built if mysql or postgres aren't in USE (courier-authlib-0.58.ebuild.patch,203 bytes, patch)
2006-09-01 16:36 UTC, Alan Mosca
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Wasser 2005-10-14 05:38:11 UTC
We got a memory leak here in 'courier-authlib-0.57-r1'. After a week or too the
used memory increases to 240 MB and raising. After a while the kernel kills some
processes and the server goes down. B-(

Useflag for this package: 

[ebuild   R   ] net-libs/courier-authlib-0.57-r1  -berkdb +crypt -debug -gdbm
-ldap -mysql -pam -postgres 0 kB

'top' output (sorted by memory usage) after 21 days:

top - 14:22:24 up 21 days, 11:21,  3 users,  load average: 0.03, 0.05, 0.02
Tasks: 147 total,   1 running, 146 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.7% us,  0.7% sy,  0.0% ni, 97.7% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   1034788k total,  1018416k used,    16372k free,    81640k buffers
Swap:  1959888k total,  1009704k used,   950184k free,   134456k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
27839 root      15   0  239m  73m  900 S  0.0  7.2   0:50.07 authdaemond
27846 root      15   0  236m  71m  904 S  0.0  7.0   0:49.77 authdaemond
27843 root      15   0  237m  70m  900 S  0.0  7.0   0:50.50 authdaemond
27849 root      15   0  239m  70m  904 S  0.0  7.0   0:50.54 authdaemond
27844 root      15   0  229m  69m  904 S  0.3  6.9   0:48.42 authdaemond
27847 root      15   0  234m  69m  900 S  0.0  6.9   0:49.39 authdaemond
27841 root      15   0  237m  68m  904 S  0.0  6.8   0:50.56 authdaemond
27842 root      15   0  230m  67m  900 S  0.0  6.6   0:48.79 authdaemond
27850 root      15   0  235m  66m  904 S  0.0  6.6   0:50.14 authdaemond
27845 root      15   0  233m  65m  904 S  0.0  6.5   0:49.54 authdaemond
[...]

Hints are welcome!
Comment 1 Mike Baikov 2005-12-13 03:47:01 UTC
me too. 2Gb RAM (+swap) is filled only authdaemond processes :(
Comment 2 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-01-14 23:52:37 UTC
running net-libs/courier-authlib-0.58 i am not seeing this. can you upgrade and test?
Comment 3 Erik Wasser 2006-01-16 03:08:17 UTC
Thanks for the feedback.

Update to net-libs/courier-authlib-0.58 was done and I'm watching the memory usage. I'll get back to you!
Comment 4 Erik Wasser 2006-02-03 10:46:08 UTC
The bug is still there:

[ebuild   R   ] net-libs/courier-authlib-0.58  +berkdb +crypt -debug +gdbm +ldap +mysql +pam +postgres 0 kB

The memory usage is still raising ca. 1 MB per day and process. B-(
Comment 5 Brian Jackson (RETIRED) gentoo-dev 2006-02-23 07:59:50 UTC
I can't reproduce this. Is there any way you can narrow the problem down via disabling USE flags one by one? In any case, I can't physically do the debugging of this. Unfortunately, I'm going to have to put that on you guys that are having the problem.
Comment 6 Erik Wasser 2006-02-23 08:27:30 UTC
Okay, here we go. That is now my minimal configuration:

[ebuild   R   ] net-libs/courier-authlib-0.58  -berkdb +crypt -debug -gdbm -ldap -mysql -pam -postgres 0 kB

I will test it and add the useflags one at a time. This will take some time. B-)
Comment 7 Brian Jackson (RETIRED) gentoo-dev 2006-02-23 09:28:22 UTC
Thank you. It's much appreciated.
Comment 8 Erik Wasser 2006-03-02 03:04:43 UTC
It's still a problem. B-(

The useflags are now:

[ebuild   R   ] net-libs/courier-authlib-0.58  -berkdb +crypt -debug -gdbm -ldap -mysql -pam -postgres 0 kB

The output of top looks like this:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12068 root      16   0 98.0m  67m  976 S  0.0  6.7   0:20.51 authdaemond
12076 root      15   0 99340  66m  976 S  0.0  6.6   0:20.37 authdaemond
12078 root      16   0 98740  66m  976 S  0.0  6.6   0:20.08 authdaemond
12077 root      15   0 97168  65m  976 S  0.0  6.5   0:19.59 authdaemond
12074 root      16   0 97160  65m  976 S  0.0  6.5   0:19.85 authdaemond
12072 root      15   0 97084  65m  976 S  0.0  6.5   0:19.86 authdaemond
12067 root      16   0 96964  65m  976 S  0.0  6.5   0:19.78 authdaemond
12073 root      16   0 96500  64m  976 S  0.0  6.4   0:19.44 authdaemond
12075 root      16   0 95208  64m  976 S  0.0  6.3   0:19.52 authdaemond
12066 root      16   0 91244  61m  976 S  0.0  6.1   0:18.62 authdaemond
[...]

...and raising. What else can we test to eliminate the bug? Or is the crypt use flag the bad flag?
Comment 9 Mike Baikov 2006-03-09 01:07:24 UTC
Yep. courier-authlib-0.58 eat 1Gb ram + 2Gb swap in 1 week.

Very bad!

+crypt +mysql use flags
Comment 10 Konstantin 2006-08-01 10:27:42 UTC
I'm having the same problem on all (three) mailservers with
[ebuild   R   ] net-libs/courier-authlib-0.58  USE="-crypt -gdbm -mysql -berkdb -debug -ldap -pam -postgres" 0 kB

I was trying to reemerge courier-authlib with different USE flags, but no luck. The more activity - the more memory eaten. Still no found any solution. :(
Comment 11 Kim Johansen 2006-08-03 23:03:15 UTC
Jeg have just emerge 0.58 and my is also leaking...

net-libs/courier-authlib-0.58  USE="berkdb crypt mysql pam -debug -gdbm -ldap -postgres" 0 kB

Im am running on a amd64 if that can help to anything...
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2006-08-10 05:17:28 UTC
I guess the best thing to do here is find someone with the problem that can do some debugging with valgrind. My own server doesn't have enough activity that I can see this problem and it's currently offline, so I can't help yet.
Comment 13 Alan Mosca 2006-08-21 15:19:22 UTC
I noticed in a few forums this might be tied to some vpopmail bug. Could you tell me if you are all using it and possibly attach your /etc/courier/authlib/authdaemonrc file?
Comment 14 Erik Wasser 2006-08-22 03:54:59 UTC
Stripping all the comments, here are the essentials of the config file:

authmodulelist="authvchkpw"
authmodulelistorig="authuserdb authpwd authshadow authcustom authvchkpw authpipe"
daemons=10
authdaemonvar=/var/lib/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
Comment 15 Konstantin 2006-08-26 07:01:27 UTC
Yeah, I'm using vpopmail with mysql. Here goes my config:

authmodulelist="authvchkpw"
authmodulelistorig="authuserdb authpwd authshadow authcustom authvchkpw authpipe"
daemons=5
authdaemonvar=/var/lib/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
Comment 16 Brian Jackson (RETIRED) gentoo-dev 2006-08-31 09:50:40 UTC
Who is taking care of vpopmail? Do any of you have any input on this bug?
Comment 17 Alan Mosca 2006-09-01 16:05:21 UTC
Created attachment 95693 [details, diff]
authvchkpw is not built if mysql or postgres aren't in USE

According to http://marc.theaimsgroup.com/?l=vchkpw&m=111998547619293&w=2 , this bug appears to be something that needs to be worked out by upstream. I'll try gathering as much info as possible and contact them. Meantimes I noticed that authvchkpw is built even if mysql and postgres aren't in USE. Attached is an ebuild patch to avoid this, so at least who doesn't need authvchkpw isn't affected.
Comment 18 Alan Mosca 2006-09-01 16:36:20 UTC
Created attachment 95695 [details, diff]
authvchkpw is not built if mysql or postgres aren't in USE

The first patch is wrong
Comment 19 Fernando J. Pereda (RETIRED) gentoo-dev 2006-11-13 13:19:26 UTC
Thank you for your time Alan, hopefully UPSTREAM will find / fix this bug.

- ferdy
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-11-28 09:59:52 UTC
*** Bug 156520 has been marked as a duplicate of this bug. ***