From: Joshua Watt Date: Thu, 3 Jan 2019 16:36:11 +0000 (-0600) Subject: bitbake: bitbake: persist_data: Fix Locking Protocol Error X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cea00c128311539a870d0cd233366480ddaff605;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: bitbake: persist_data: Fix Locking Protocol Error Under heavy load with process delays, sqlite can issues a "locking protocol" error (SQLITE_PROTOCOL). Unfortunately, it is impossible to distinguish between actual locking protocol errors and this race condition, so they best that can be done is to retry the operation when the error is detected. [YOCTO #13108] (Bitbake rev: 93cd15644f9d12b38abea276fee7b5bade0276df) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 4468facd18f..0d44100f103 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -59,7 +59,7 @@ class SQLTable(collections.MutableMapping): try: return f(self, *args, **kwargs) except sqlite3.OperationalError as exc: - if 'is locked' in str(exc) and count < 500: + if count < 500 and ('is locked' in str(exc) or 'locking protocol' in str(exc)): count = count + 1 if reconnect: self.reconnect()