summaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 14:20:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-08 10:32:15 +0000
commit058f8517c041b80e8b591ad7d34a68281b2d03fc (patch)
tree28acaa11575479ee1f01b37b709c89476793b7d2 /lib/bb/cooker.py
parent3d7186353e804c9410096c408bc337a98c8b33fe (diff)
downloadbitbake-contrib-058f8517c041b80e8b591ad7d34a68281b2d03fc.tar.gz
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index aca947060..5e5708ee2 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