From f0e22f45562e6398d3338aebc58763679b22346f67b298159369153abdf7a376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 27 Aug 2019 02:42:06 +0000 Subject: [PATCH] Accepting request 726287 from home:firstyear:branches:devel:libraries:c_c++ - Add opd deadlock patch as found and documented by Red Hat. (bsc#1148244) OBS-URL: https://build.opensuse.org/request/show/726287 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=58 --- 0001-OPD-deadlock-RH-BZ-1349779.patch | 28 +++++++++++++++++++++++++++ libdb-4_8.changes | 6 ++++++ libdb-4_8.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 0001-OPD-deadlock-RH-BZ-1349779.patch diff --git a/0001-OPD-deadlock-RH-BZ-1349779.patch b/0001-OPD-deadlock-RH-BZ-1349779.patch new file mode 100644 index 0000000..9b596fd --- /dev/null +++ b/0001-OPD-deadlock-RH-BZ-1349779.patch @@ -0,0 +1,28 @@ +From 5124401571fa1807a6595659ab7a069f17fe1068 Mon Sep 17 00:00:00 2001 +From: William Brown +Date: Tue, 27 Aug 2019 10:01:54 +1000 +Subject: [PATCH] OPD deadlock: RH BZ 1349779 + +--- + db/db_cam.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/db/db_cam.c b/db/db_cam.c +index 4c1322d..7f133e5 100644 +--- a/db/db_cam.c ++++ b/db/db_cam.c +@@ -850,6 +850,11 @@ __dbc_iget(dbc, key, data, flags) + flags == DB_PREV || flags == DB_PREV_DUP)) { + if (tmp_rmw && (ret = dbc->am_writelock(dbc)) != 0) + goto err; ++ /* Latch the primary tree page here in order to not deadlock later. */ ++ if (cp->page == NULL && ++ (ret = __memp_fget(mpf, &cp->pgno, ++ dbc->thread_info, dbc->txn, 0, &cp->page)) != 0) ++ goto err; + if (F_ISSET(dbc, DBC_TRANSIENT)) + opd = cp->opd; + else if ((ret = __dbc_idup(cp->opd, &opd, DB_POSITION)) != 0) +-- +2.20.1 (Apple Git-117) + diff --git a/libdb-4_8.changes b/libdb-4_8.changes index b4284b6..66aac44 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 27 00:06:09 UTC 2019 - William Brown + +- Add opd deadlock patch as found and documented by Red Hat. + (bsc#1148244) + ------------------------------------------------------------------- Mon Aug 19 06:59:04 UTC 2019 - Tomáš Chvátal diff --git a/libdb-4_8.spec b/libdb-4_8.spec index 36564c5..9c1e026 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -33,6 +33,7 @@ Source2: baselibs.conf Patch0: db-%{version}.patch # PATCH-FIX-OPENSUSE Fix build with GCC8, conflict with reserved builtin name Patch1: libdb-fix-atomic.patch +Patch2: 0001-OPD-deadlock-RH-BZ-1349779.patch BuildRequires: autoconf BuildRequires: fdupes BuildRequires: gcc-c++ @@ -92,6 +93,7 @@ This package contains the header files and libraries. %setup -q -n %{generic_name}-%{version} %patch0 %patch1 +%patch2 -p1 %build cd dist