GNOME Bugzilla – Bug 306688
Test Beagle on XFS, JFS, UDF
Last modified: 2005-10-17 19:51:14 UTC
FileSystemModel.cs contains this code: // If the inode data has changed since it was last // indexed, we might have been moved or copied. if (! DatesAreTheSame (attr.LastIndexedTime, stat.CTime)) This check is bad because setting an extended attribute modifies the ctime of an inode, you can observe this on the console using setfattr and stat. Things are usually ok because the time written into the EA data, and the time when the EA is written to the file, usually reside within the same second. Some systems provide stat data at higher resolution than seconds, so technically, the ctime can never match the time in the EA.
Created attachment 47584 [details] [review] Reduce accuracy to 2 sec Well, this is my first open-source code-contribution ever. I have no idea whatsoever on how this date-subtraction-function actually works, but I would guess the region of (0,2) seconds off would give us some leverage even if the clock passes the second in transit.
This was no good. The bug is still there. I added some debug-info: double t = (system_io_datetime - stat_datetime).TotalSeconds; if ( Math.Abs (t) < 2 || Math.Abs (t-3600) < 2) return true; else { if(Debug) Logger.Log.Debug("DONG!! tid1:" + system_io_datetime + " tid2: " + stat_datetime + " t:" + t," "); return false; } But the same thing happens still. beagled runs for a while, and then enters this endless loop indexing the same files over and over and over forever. Here is sample output from when it enters terminal modus: DEBUG: worker added: name=HandleConnection (1957) refcount=1 DEBUG: worker removed: name=HandleConnection (1956) DEBUG: Done sending request DEBUG: Finished task Crawling /home/hhg/Desktop/del in .10s DEBUG: Starting task File System Crawler DEBUG: Crawl Task Scheduling /home/hhg/Desktop/del (state=PossiblyClean) DEBUG: Finished task File System Crawler in .00s DEBUG: Starting task Crawling /home/hhg/Desktop/del DEBUG: *** What should we do with /home/hhg/Desktop/del/405themovie_320x224.mpg? DEBUG: *** Doing nothing to /home/hhg/Desktop/del/405themovie_320x224.mpg DEBUG: *** What should we do with /home/hhg/Desktop/del/the game.avi? DEBUG: *** Doing nothing to /home/hhg/Desktop/del/the game.avi DEBUG: *** What should we do with /home/hhg/Desktop/del? DEBUG: *** Doing nothing to /home/hhg/Desktop/del DEBUG: worker added: name=HandleConnection (1958) refcount=1 DEBUG: worker removed: name=HandleConnection (1957) DEBUG: Done sending request DEBUG: Finished task Crawling /home/hhg/Desktop/del in .09s DEBUG: Starting task File System Crawler DEBUG: Crawl Task Scheduling /home/hhg/Desktop/del (state=PossiblyClean) DEBUG: Finished task File System Crawler in .00s DEBUG: Starting task Crawling /home/hhg/Desktop/del DEBUG: *** What should we do with /home/hhg/Desktop/del/405themovie_320x224.mpg? DEBUG: *** Doing nothing to /home/hhg/Desktop/del/405themovie_320x224.mpg DEBUG: *** What should we do with /home/hhg/Desktop/del/the game.avi? DEBUG: *** Doing nothing to /home/hhg/Desktop/del/the game.avi DEBUG: *** What should we do with /home/hhg/Desktop/del? DEBUG: *** Doing nothing to /home/hhg/Desktop/del DEBUG: worker added: name=HandleConnection (1959) refcount=1 DEBUG: worker removed: name=HandleConnection (1958) DEBUG: Done sending request DEBUG: Finished task Crawling /home/hhg/Desktop/del in .11s DEBUG: Starting task File System Crawler DEBUG: Crawl Task Scheduling /home/hhg/Desktop/del (state=PossiblyClean) DEBUG: Finished task File System Crawler in .00s
After installing Ubuntu 5.10 I can no longer reproduce this error. I recommend the bug is closed.
Should probably test some less common filesystems before closing this bug. A quick grep shows that XFS, JFS and UDF all do fine grained times, the others just initialize ->tv_nsec to 0. (Does UDF do xattr?)
UDF has no xattr. XFS and JFS do store fine-grained times but beagle handles this just fine :)