Bug 162348 - net-mail/vpopmail CONFIG_PROTECT causes portage/etc-update/dispatch-conf to freeze for hours
Bug#: 162348 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: critical Priority: P2
Resolution: FIXED Assigned To: maintainer-needed@gentoo.org Reported By: alex@halogen-dg.com
Component: Ebuilds
URL: 
Summary: net-mail/vpopmail CONFIG_PROTECT causes portage/etc-update/dispatch-conf to freeze for hours
Keywords:  
Status Whiteboard: 
Opened: 2007-01-16 12:59 0000
Description:   Opened: 2007-01-16 12:59 0000
Hi!

I have a mail server where vpopmail is installed. After some time of its normal
work I started to notice that 'emerge' became extremely slow. I have tried to
find out what actual problem is, and what I found is that etc-update is the
cause. It freezes and every etc-update takes 30-40 minutes to finish. My server
experiences big sysload during this action. 

I tried to debug whats wrong inside of etc-upate. And found that one of
CONFIG_PROTECT directories is: /var/vpopmail/domains. Obviously thats the
problem. I never heard of any configuration files in this directory. This is
mail storage directory for hundreds of mail server users. Its main mail base
and its extremely large. 

I would like to suggest to remove /var/vpopmail/domains from CONFIG_PROTECT of
vpopmail ebuild (at least I have such dir listed in files/99vpopmail

At all, why it was included originally? I do not remember any configuration
files stored there. All vpopmail configuration files are in /var/vpopmail/etc.
I  am sure 'domains' is only for data storage, no configuration files are
stored there.

File location:
/usr/portage/net-mail/vpopmail/files/99vpopmail

appserver files # cat 99vpopmail 
ROOTPATH="/var/vpopmail/bin"
CONFIG_PROTECT="/var/vpopmail/domains /var/vpopmail/etc"



Reproducible: Always

Steps to Reproduce:
1. Install vpopmail
2. Have a large database of Email (2-3 Gb would be enoug)
3. run etc-update. System will freeze for a long time especially if your drives
are slow.


Actual Results:  
it should be 2-3 seconds of scanning. as it is after I removed CONFIG_PROTECT,
from /etc/env.d/99vpopmail and run env-update

------- Comment #1 From Alex V. Koval 2007-04-29 11:01:40 0000 -------
interesting, how can I help in the pushing of this bug fix? I hate doing same
things again and again, and this bug appears every time new version of vpopmail
is installed. 

the fix is simple: remove /var/vpopmail/domains from CONFIG_PROTECT . do you
want me to submit a patch? Here it is (a dumb simple remove
/var/vpopmail/domains from CONFIG_PROTECT:

*** 99vpopmail  2007-04-29 14:00:15.000000000 +0300
--- 99vpopmail~ 2003-08-06 12:24:54.000000000 +0300
***************
*** 1,2 ****
  ROOTPATH="/var/vpopmail/bin"
! CONFIG_PROTECT="/var/vpopmail/etc"
--- 1,2 ----
  ROOTPATH="/var/vpopmail/bin"
! CONFIG_PROTECT="/var/vpopmail/domains /var/vpopmail/etc"


anything else I can do?

------- Comment #2 From Zac Medico 2007-07-26 22:04:55 0000 -------
(In reply to comment #1)
> anything else I can do?

Adding CONFIG_PROTECT="-/var/vpopmail/domains" to make.conf will negate that
path.

------- Comment #3 From Jakub Moc (RETIRED) 2007-07-26 22:50:56 0000 -------
*** Bug 186610 has been marked as a duplicate of this bug. ***

------- Comment #4 From Jakub Moc (RETIRED) 2007-07-26 22:52:37 0000 -------
*** Bug 118410 has been marked as a duplicate of this bug. ***

------- Comment #5 From Jakub Moc (RETIRED) 2007-07-26 22:54:04 0000 -------
@net-mail: ping!

------- Comment #6 From Benedikt Böhm 2007-07-29 23:00:01 0000 -------
fixed in 5.4.19

------- Comment #7 From Jakub Moc (RETIRED) 2007-08-09 08:04:41 0000 -------
*** Bug 146260 has been marked as a duplicate of this bug. ***