diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-07 14:20:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:05:50 +0000 |
commit | 4fafb6c6d261de78dd1bc3824a1389d191b70321 (patch) | |
tree | 262681200842af6bde40eeded50dbf08ec369c8d | |
parent | 100439e715841ecfd6460d59cd51c831184b328d (diff) | |
download | bitbake-4fafb6c6d261de78dd1bc3824a1389d191b70321.tar.gz |
bitbake: cooker: Handle inofity queue overflows more gracefully
If many files change and the inotify queue overflows, rather than print
a traceback, invalidate the caches and warn the user.
[YOCTO #10676]
(Bitbake rev: 058f8517c041b80e8b591ad7d34a68281b2d03fc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | lib/bb/cooker.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index d112f8219..0f48efca6 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -252,6 +252,10 @@ class BBCooker: signal.signal(signal.SIGHUP, self.sigterm_exception) def config_notifications(self, event): + if event.maskname == "IN_Q_OVERFLOW": + bb.warn("inotify event queue overflowed, invalidating caches.") + self.baseconfig_valid = False + return if not event.pathname in self.configwatcher.bbwatchedfiles: return if not event.pathname in self.inotify_modified_files: @@ -259,6 +263,10 @@ class BBCooker: self.baseconfig_valid = False def notifications(self, event): + if event.maskname == "IN_Q_OVERFLOW": + bb.warn("inotify event queue overflowed, invalidating caches.") + self.parsecache_valid = False + return if not event.pathname in self.inotify_modified_files: self.inotify_modified_files.append(event.pathname) self.parsecache_valid = False |