From: Richard Purdie Date: Wed, 7 Dec 2016 14:20:48 +0000 (+0000) Subject: cooker: Handle inofity queue overflows more gracefully X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=058f8517c041b80e8b591ad7d34a68281b2d03fc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index aca94706078..5e5708ee2bb 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