After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169262 - Exception on Inotify Event
Exception on Inotify Event
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: Milestone 1
Assigned To: Robert Love
Robert Love
Depends on:
Blocks:
 
 
Reported: 2005-03-05 02:25 UTC by Ryan P Skadberg
Modified: 2005-03-11 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The fix. (1.66 KB, patch)
2005-03-11 18:42 UTC, Robert Love
none Details | Review

Description Ryan P Skadberg 2005-03-05 02:25:24 UTC
Version details: CVS 2005/03/04 20:50 America/New_York
Distribution/Version: Fedora Rawhide

Latest Beagle and Inotify 0.20, getting this when I cause an inotify event
(touch a file)

WARN: Exception caught while executing
Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:Void StartWorker()
WARN: System.IO.IOException: /home/skadz/Downloads/mp3_256Kbps_complete
in <0x001f5> Beagle.Util.Inotify:Watch
(string,Beagle.Util.Inotify/EventType,Beagle.Util.Inotify/EventType)
in <0x0000f> Beagle.Util.Inotify:Watch (string,Beagle.Util.Inotify/EventType)
in <0x00049> Beagle.Daemon.FileSystemQueryable.InotifyBackend:WatchFiles
(string,object)
in <0x001af> Beagle.Daemon.FileSystemQueryable.FileSystemModel:ScanAll ()
in <0x0000d>
Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:OnModelNeedsScan
(Beagle.Daemon.FileSystemQueryable.FileSystemModel)
in <0x0003f> (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_FileSystemModel
(Beagle.Daemon.FileSystemQueryable.FileSystemModel)
in <0x00341> Beagle.Daemon.FileSystemQueryable.FileSystemModel:AddRoot (string)
in <0x00136> Beagle.Daemon.FileSystemQueryable.FileSystemQueryable:StartWorker ()
in <0x00037> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
in <0x00018> Beagle.Util.ExceptionHandlingThread:ThreadStarted ()
Comment 1 Jon Trowbridge 2005-03-09 19:24:08 UTC
Robert: since you are looking at that code now, any thoughts?
Comment 2 Robert Love 2005-03-09 19:31:30 UTC
This isn't very helpful, or I cannot read C# traces.

But, why is touching a file causing Watch() to be called?

Could you of patched the kernel wrong?  Sure that the patch applied without problem?
Comment 3 Robert Love 2005-03-09 21:02:42 UTC
skadz, does Util/inotify-test work?  What about the test program in inotify-utils?
Comment 4 Joe Shaw 2005-03-10 18:33:11 UTC
My guess is that there's a race here: the file system backend is in the process
of starting up and adding watches to everything, and one thing that is about to
be watched is deleted.  Inotify.Watch() looks to make sure that the file exists
and throws an IOException if not.
Comment 5 Robert Love 2005-03-11 18:18:38 UTC
That is it.  Cunning as ever, Shaw.

We should not through an IO Exception.  We cannot expect the filesystem to be
consistent.  I'll change the exception to a simple return.

By the way, I woke up this morning and it seemed to me, that every night turns
out to be, a little more like Bukowski.
Comment 6 Robert Love 2005-03-11 18:21:40 UTC
Actually, we should probably throw the exception, but catch it in the callers. 
Sigh, more work.
Comment 7 Robert Love 2005-03-11 18:24:08 UTC
Actually, we only need to do this in the FileSystemBackend.  The rest of the
calls to Watch() do consider it a critical problem when the request file does
not exist.
Comment 8 Robert Love 2005-03-11 18:42:09 UTC
Created attachment 38568 [details] [review]
The fix.
Comment 9 Robert Love 2005-03-11 18:44:08 UTC
Fix commited to "CVS"