BackupPC-users

Re: [BackupPC-users] Was BackupPC_trashClean ever fixed not to hog CPU

2010-01-04 00:00:03
Subject: Re: [BackupPC-users] Was BackupPC_trashClean ever fixed not to hog CPU
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
Date: Sun, 3 Jan 2010 20:58:38 -0800
Jeffrey writes:

> In the past, people have mentioned that sometimes BackupPC_trashClean
> seems to get hung and hog almost 100% of CPU.
> 
> This is quite insidious since what apparently happens is that when
> trashClean has trouble removing a file(s), it just continues to loop
> through trying.
> 
> However, no error message is posted to the log or the web
> interface. In my case, it seems that this had been going on for days
> without any warning.
> 
> Also, Craig mentioned in the past that this could be due to permission
> error and suggested running "sudo -u backuppc rm -rv trash/*" to
> check. Well in my case, the 'rm' succeeded suggesting that the problem
> may lie elsewhere.
> 
> But again, I think there are two issues that need to be fixed:
> 1. trash_Clean should not be allowed to go into a tight endless loop
> (I think Craig had mentioned inserting a wait in the loop but not sure
> if it ever was done)
> 2. Also, errors in trash removal should be logged and added to the
> regular email error messages that are sent out.

I looked at the code and I can't see where BackupPC_trashClean can
get into a tight loop, unless the file system is corrupted in a way
that results in an infintely-deep directory tree (in which case it
will eventually run out of memory).

It does try to remove each file up to three times, but it will give up
and go on.  It will log an error message if it can't remove all the
files, but then it goes to sleep for a few minutes before trying again.

So I'm not sure how BackupPC_trashClean can get into a state where it
is just eating 100% of the CPU.

Craig

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>