summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-01-03 10:36:11 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-08 11:16:03 +0000
commitcea00c128311539a870d0cd233366480ddaff605 (patch)
tree3f5362755553e27bf54ef1e1c2d2e7009c47bc15 /bitbake
parentfd045373e01409e273479c9e0e2e69bd1b7815f9 (diff)
downloadpoky-cea00c128311539a870d0cd233366480ddaff605.tar.gz
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 <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/persist_data.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 4468facd18..0d44100f10 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -59,7 +59,7 @@ class SQLTable(collections.MutableMapping):
59 try: 59 try:
60 return f(self, *args, **kwargs) 60 return f(self, *args, **kwargs)
61 except sqlite3.OperationalError as exc: 61 except sqlite3.OperationalError as exc:
62 if 'is locked' in str(exc) and count < 500: 62 if count < 500 and ('is locked' in str(exc) or 'locking protocol' in str(exc)):
63 count = count + 1 63 count = count + 1
64 if reconnect: 64 if reconnect:
65 self.reconnect() 65 self.reconnect()