Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #9156 (closed)

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

Bug: DropBox may fail if a file/directory is not accessible

Reported by: cblackburn Owned by: cblackburn
Priority: critical Milestone: OMERO-4.4.7
Component: OmeroFs Version: n.a.
Keywords: n.a. Cc: jamoore, jburel
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by cblackburn)

If a directory has its permissions set so that it is not accessible this can cause problems for the file monitor on Linux (see below). Other OSs may have similar problems.

2012-04-24 17:00:11,187 WARNI [                                  stderr] (Thread-4  ) [2012-04-24 17:00:11,182 pyinotify ERROR] add_watch: cannot watch /data/OMERO/DropBox/aigouyb/120406_ecrase_modere WD=-1 Errno=Permission denied (EACCES)
2012-04-24 17:00:11,182 ERROR [                               pyinotify] (Thread-4  ) add_watch: cannot watch /data/OMERO/DropBox/aigouyb/120406_ecrase_modere WD=-1 Errno=Permission denied (EACCES)
2012-04-24 17:00:11,223 WARNI [                                  stderr] (Thread-4  ) Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/srv/omero/lib/python/omero_ext/pyinotify.py", line 1410, in run
    self.loop()
  File "/srv/omero/lib/python/omero_ext/pyinotify.py", line 1396, in loop
    self.process_events()
  File "/srv/omero/lib/python/omero_ext/pyinotify.py", line 1197, in process_events
    self._default_proc_fun(revent)
  File "/srv/omero/lib/python/omero_ext/pyinotify.py", line 840, in __call__
    return _ProcessEvent.__call__(self, event)
  File "/srv/omero/lib/python/omero_ext/pyinotify.py", line 577, in __call__
    return self.process_default(event)
  File "/srv/omero/lib/python/fsPyinotifyMonitor.py", line 232, in process_default
    self.wm.addWatch(name, self.wm.watchParams[pathModule.path(name).parent].getMask())
  File "/srv/omero/lib/python/fsPyinotifyMonitor.py", line 148, in addWatch
    for d in pathModule.path(path).dirs():
  File "/srv/omero/lib/python/path.py", line 383, in dirs
    return [p for p in self.listdir(pattern) if p.isdir()]
  File "/srv/omero/lib/python/path.py", line 367, in listdir
    names = os.listdir(self)
OSError: [Errno 13] Permission denied: '/data/OMERO/DropBox/aigouyb/120406_ecrase_modere'

Change History (8)

comment:1 Changed 12 years ago by cblackburn

  • Description modified (diff)

comment:2 Changed 12 years ago by cblackburn

  • Milestone changed from OMERO-Beta4.4 to OMERO-Beta4.4.1
  • Sprint 2012-06-19 (17) deleted

For now pushing this to 4.4.1 as investigative work won't get done until after Paris.

comment:3 Changed 12 years ago by cblackburn

See original forum thread:


http://www.openmicroscopy.org/community/viewtopic.php?f=4&t=1170&p=4981#p4981


Apparently, the program responsible for this crash is rsync.

Since I can not modify the way it behaves by default, I had a look at the DropBox error and I might have a fix.

In the script lib/python/path.py, I replaced the following line:

names = os.listdir(self)

by this:

try:
  names = os.listdir(self)
except OSError:
  # ignore unreadable directories
  names = []

comment:5 Changed 11 years ago by jmoore

  • Cc jburel added
  • Priority changed from major to critical

jean-marie: this has a one line fix that has been tested on the forums (twice). We should try to get it in asap.

comment:6 Changed 11 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

I opened a PR with Colin's branch : https://github.com/openmicroscopy/openmicroscopy/pull/719

Since this has been explicitly requested by externals (twice on the forums), we're fast-tracking this for 4.4.6. May require some refactoring later.

comment:7 Changed 11 years ago by jmoore <josh@…>

  • Remaining Time set to 0

(In [5b3a57579fd7f44e341051dcb1950adf8d6144c7/ome.git] on branch develop) Improved listdir to handle unreadable directories. Fixes #9156.

comment:8 Changed 11 years ago by Josh Moore <josh@…>

(In [7dd5bea0b04f4a1bb906f612506f1a6f77b03b85/ome.git] on branch develop) Merge pull request #722 from joshmoore/rebased/develop/dropbox-listdir-9156

Fix DropBox? on Linux (Fix #9156) (rebased onto develop)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68017 sec.)

We're Hiring!