quota -f dies with segmentation fault

Adi Linden adil at adis.on.ca
Wed Jun 16 10:26:54 EDT 2004


> IIRC the 'quota -f' also generated something like 'too many open files'. A
> second run of 'quota -f' has then finished without problems.

When I tested migrating users from server A to server B I only used a 
copied a small number of users (about 30) only with less than 200MB of 
mail. Instead of copying the existing quota database I pulled the quota 
setting from the old server, made sure the settings were sane, and built a 
new file for each user. The first line contained 0 and the second line the 
quota in kb. Example for a user with 50MB limit:

[root at mailstore root]# cat /var/lib/imap/quota/a/user.anthonylegarde
0
50000

'quota -f' ran just fine but when it finished it set the disk usage to 
double of the actual amount. A second run of 'quota -f' set the disk usage 
to the proper value. I thought thiswas odd but being on a schedule I had a 
working solution, so I ran with it.

> I'm not sure about the open files limit. This is on Linux, kernel 2.4. The
> cyrus user, under which quota was started, has the default ulimit of 1024
> open files. The kernel according to /proc/sys/fs/file-max has 838860.
> Could it be that the 'quota -f' opens more that 1024 files and segfaults
> because of it?

When I moved user data from the old server to the new, the 'quota -f' run 
died with a 'too many open files' error during the first few hundred 
users. I did a 'ulimit -a 65536' as root before becoming cyrus and doing 
'quota -f'. This made this error go away but now I get the seg fault after 
the last user has been processed but before the process is complete.

Because 'quota -f' takes nearly an hour to run it is difficult for me to 
do any troubleshooting. There are few opportunities when I can shutdown 
the cyrus-imapd processes to run 'quota -f'. And I cannot replicate the 
problem on a smaller box that has a smaller number of users....

If it is safe to run 'quota -f' with the cyrus-imapd processes running I 
try to find the problem but I need to know if this is safe.

Adi

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list