Re: quota -f dies with segmentation fault

2004-06-16 Thread Rob Siemborski
On Wed, 16 Jun 2004, Simon Matter wrote:
IIRC the 'quota -f' also generated something like 'too many open files'. A
second run of 'quota -f' has then finished without problems.
There is a file descriptor leak in 2.2.5, but it is fixed in CVS (and 
we'll be seeing another release soon).

-Rob
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper
---
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


Re: quota -f dies with segmentation fault

2004-06-16 Thread Adi Linden
> 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:

[EMAIL PROTECTED] root]# cat /var/lib/imap/quota/a/user.anthonylegarde
0
5

'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


Re: quota -f dies with segmentation fault

2004-06-15 Thread Simon Matter
> Hi,
>
> I am running cyrus-imapd 2.2.5 on a server with 17,000 user accounts and a
> 131GB mail spool. The mail accounts were recently moved from a server
> running an older version. During the move quota infomration was lost. When
> I run "quota -f" it dies with segmentation fault after the last user has
> been processed. After "quota -f" dies I have two files in the
> /var/lib/imap/quota/ directories for each user, one like user.adilinden
> and another user.adilinden.NEW.

Now that you mention it I remember that I had the same problem last week.
Another problem was that some peoples quota has been removed. I don't know
whether the two issues are related but at least I couldn't find out what
happened.
IIRC the 'quota -f' also generated something like 'too many open files'. A
second run of 'quota -f' has then finished without problems.
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?

Simon

>
> Also, I am running "quota -f" with cyrus shut down. Is this necessary? Can
> I run quota with cyrus-imapd running?
>
> Thanks,
> 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
>
>


---
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


quota -f dies with segmentation fault

2004-06-15 Thread Adi Linden
Hi,

I am running cyrus-imapd 2.2.5 on a server with 17,000 user accounts and a 
131GB mail spool. The mail accounts were recently moved from a server 
running an older version. During the move quota infomration was lost. When 
I run "quota -f" it dies with segmentation fault after the last user has 
been processed. After "quota -f" dies I have two files in the 
/var/lib/imap/quota/ directories for each user, one like user.adilinden 
and another user.adilinden.NEW.

Also, I am running "quota -f" with cyrus shut down. Is this necessary? Can 
I run quota with cyrus-imapd running?

Thanks,
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