]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake: cooker: Handle inofity queue overflows more gracefully
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Dec 2016 14:20:48 +0000 (14:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Jan 2017 17:21:46 +0000 (17:21 +0000)
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)

(Bitbake rev: 4fafb6c6d261de78dd1bc3824a1389d191b70321)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py

index d112f8219c22f625e5ea9ebbed249d96fa9f9cb1..0f48efca6a52cbbf0c0ddca33465500cdcaff0f4 100644 (file)
@@ -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