DBus timeout while adding watches on a large HD

Bug #220930 reported by Adrián
2
Affects Status Importance Assigned to Milestone
HD Lorean
New
Undecided
Unassigned

Bug Description

Starting the app in a huge HD for the first time results in a Dbus Timeout. Seeking around hdloreand was doing this when the timeout occurs:

Traceback (most recent call last):
  File "../hdloreand/hdloreand.py", line 174, in <module>
    daemon = hdloreand()
  File "../hdloreand/hdloreand.py", line 75, in __new__
    self.__watcher = Watcher.Watcher()
  File "/home/remoto/adrian/Facultad/IS/hdlorean/testing/src/hdloreand/watcher/Watcher.py", line 98, in __init__
    self.__pyinotifyHandler = PyinotifyHandler(self,self.__watched,self.__pblacklist,self.__whitelist,self.__reBlacklist,parents,self.__CFM.getEveryChange())
  File "/home/remoto/adrian/Facultad/IS/hdlorean/testing/src/hdloreand/watcher/PyinotifyHandler.py", line 96, in __init__
    self.addToWatched(item)
  File "/home/remoto/adrian/Facultad/IS/hdlorean/testing/src/hdloreand/watcher/PyinotifyHandler.py", line 152, in addToWatched
    _dic = self.__watched.add_watch(path, mask, None, True, True)
  File "/var/lib/python-support/python2.5/pyinotify/pyinotify.py", line 841, in add_watch
    for rpath in self.__walk_rec(apath, rec):
  File "/var/lib/python-support/python2.5/pyinotify/pyinotify.py", line 1005, in __walk_rec
    for root, dirs, files in os.walk(top):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 303, in walk
    for x in walk(path, topdown, onerror):
  File "/usr/lib/python2.5/os.py", line 293, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.5/posixpath.py", line 195, in isdir
    st = os.stat(path)
KeyboardInterrupt

It seems that adding watches should be made inside a thread so the main loop won't be affected.

Tags: dbus inotify
Revision history for this message
jotum (jorgeqr) wrote :

Removing watches also should be done into a thread or everything will explode soon

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.