You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These errors are triggered when the watchdog.observers.Observer.start method is called for an instance that is scheduled to watch something it couldn't watch. Similar to runner exceptions, Dose should give a proper message instead of crashing.
On Linux, when running Dose on a directory that has way too many subdirectories, watchdog raises an OSError because inotify has a limit on the number of watchers, and watchdog puts a watcher on every subdirectory:
$ mkdir /tmp/crash_dose
$ cd /tmp/crash_dose
$ cat /proc/sys/fs/inotify/max_user_watches | xargs seq | xargs mkdir
$ dose echo -n
*** First call ***
====================================================
[Dose] 2016-11-27 04:10:53.223946
====================================================
Traceback (most recent call last):
[...]
File "/usr/lib/python2.7/site-packages/dose/_legacy.py", line 487, in start
self._watcher.__enter__() # Returns a started watchdog.observers.Observer
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/lib/python2.7/site-packages/dose/watcher.py", line 34, in watcher
observer.start()
[...]
File "/usr/lib/python2.7/site-packages/watchdog/observers/inotify_c.py", line 402, in _raise_error
raise OSError("inotify watch limit reached")
OSError: inotify watch limit reached
A really simple way to get an OSError is to run Dose on /:
$ cd /
$ dose echo -n
*** First call ***
====================================================
[Dose] 2016-11-27 04:10:53.223946
====================================================
Traceback (most recent call last):
[...]
File "/usr/lib/python2.7/site-packages/dose/_legacy.py", line 487, in start
self._watcher.__enter__() # Returns a started watchdog.observers.Observer
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/lib/python2.7/site-packages/dose/watcher.py", line 34, in watcher
observer.start()
[...]
File "/usr/lib/python2.7/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
raise OSError(os.strerror(err))
OSError: Permission denied
The above errors happened on Dose 1.2.0 using watchdog 0.8.3. Though watchdog should switch to polling (like tail -F does) instead of crashing, Dose still has to handle exceptions coming from watchdog.
The text was updated successfully, but these errors were encountered:
Dose should deal with exceptions that comes from the watchdog observer, like:
These errors are triggered when the
watchdog.observers.Observer.start
method is called for an instance that is scheduled to watch something it couldn't watch. Similar to runner exceptions, Dose should give a proper message instead of crashing.On Linux, when running Dose on a directory that has way too many subdirectories, watchdog raises an
OSError
because inotify has a limit on the number of watchers, and watchdog puts a watcher on every subdirectory:A really simple way to get an
OSError
is to run Dose on/
:The above errors happened on Dose 1.2.0 using watchdog 0.8.3. Though watchdog should switch to polling (like tail -F does) instead of crashing, Dose still has to handle exceptions coming from watchdog.
The text was updated successfully, but these errors were encountered: