wmpop3lb2 doesn't close opened socket. If you list /proc/[pid]/fd you can see a lot of sockets opened: /proc/6459/fd $ ls -l total 6 lr-x------ 1 10 10 64 Oct 28 13:31 0 -> /dev/null lrwx------ 1 10 10 64 Oct 28 13:31 1 -> /dev/vc/1 lrwx------ 1 10 10 64 Oct 28 13:31 2 -> /dev/vc/1 lrwx------ 1 10 10 64 Oct 28 13:31 3 -> socket:[19926851] lrwx------ 1 10 10 64 Oct 28 13:31 4 -> socket:[19926853] lrwx------ 1 10 10 64 Oct 28 13:31 5 -> socket:[19929773] I submit some patch which close socket in some case unhandled cases. diff -Naur wmpop3lb2.4.2/wmpop3/Pop3Client.c wmpop3lb2.4.2-pathed/wmpop3/Pop3Client.c --- wmpop3lb2.4.2/wmpop3/Pop3Client.c 2002-06-27 16:04:42.000000000 +0200 +++ wmpop3lb2.4.2-pathed/wmpop3/Pop3Client.c 2005-10-28 13:14:44.000000000 +0300 @@ -67,12 +67,18 @@ pc->server.sin_family = AF_INET; pc->hp = gethostbyname(serverName); if( pc->hp == 0) + { + close(pc->s); return -1; + } memcpy( &(pc->server.sin_addr), pc->hp->h_addr, pc->hp->h_length); pc->server.sin_port = htons(port); if ( connect(pc->s, (struct sockaddr *)&(pc->server) , sizeof(pc->server)) < 0 ) + { + close(pc->s); return -1; + } pc->connected = CONNECTED; return 0; } Reproducible: Always Steps to Reproduce: 1. start wmpop3lb2 2. wait 24 hours 3. ls -l /proc/`/sbin/pidof wmpop3lb`/fd | grep socket | wc -l Actual Results: a opened socket count biger than 10 Expected Results: a opened socket count is less than 2. This patch isn't well tested
Created attachment 71622 [details, diff] patch which may be solves this problem
seems that this patch helped to fix this issue. $ ps -f x | grep [w]mpo user 7348 23612 0 Oct28 ? S 0:07 wmpop3lb $ date Fri Nov 4 15:42:26 EET 2005 looks like works very well for a long time: $ ls -l /proc/`/sbin/pidof wmpop3lb`/fd | grep socket | wc -l 1 $ ls -l /proc/`/sbin/pidof wmpop3lb`/fd | grep socket lrwx------ 1 user user 64 Nov 4 15:43 3 -> socket:[19938664]
In Portage (as new revision). Thanks for the submission!