]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] Do not use thread-local storage for storing LMDB reader locktable slots
authorMichał Kępień <michal@isc.org>
Mon, 27 Nov 2017 08:48:10 +0000 (09:48 +0100)
committerMichał Kępień <michal@isc.org>
Mon, 27 Nov 2017 08:48:10 +0000 (09:48 +0100)
4828. [bug] Do not use thread-local storage for storing LMDB reader
locktable slots. [RT #46556]

CHANGES
bin/named/server.c
lib/dns/view.c

diff --git a/CHANGES b/CHANGES
index dab96a8f17c9240194c881de7d27f40ea823c982..562164c94502693c7756d05d2d24d7fd41291112 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4828.  [bug]           Do not use thread-local storage for storing LMDB reader
+                       locktable slots. [RT #46556]
+
 4827.  [misc]          Add a precommit check script util/checklibs.sh
                        [RT #46215]
 
index 14f6bcfebef5dd3d10f198c8daf58bcf3e5209f4..69a52693bd81682d59b2d11652569e242a3c04de 100644 (file)
@@ -12085,8 +12085,13 @@ nzd_env_reopen(dns_view_t *view) {
                }
        }
 
+       /*
+        * MDB_NOTLS is used to prevent problems after configuration is
+        * reloaded, due to the way LMDB's use of thread-local storage (TLS)
+        * interacts with the BIND9 thread model.
+        */
        status = mdb_env_open(env, view->new_zone_db,
-                             MDB_NOSUBDIR|MDB_CREATE, 0600);
+                             MDB_NOSUBDIR|MDB_NOTLS|MDB_CREATE, 0600);
        if (status != 0) {
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
index 87420066a69d69812fd3d2ef8a8e67262b3724da..df5d8f4b66d26bf33b3165e85612d55e95a27055 100644 (file)
@@ -2122,8 +2122,13 @@ dns_view_setnewzones(dns_view_t *view, isc_boolean_t allow, void *cfgctx,
                }
        }
 
+       /*
+        * MDB_NOTLS is used to prevent problems after configuration is
+        * reloaded, due to the way LMDB's use of thread-local storage (TLS)
+        * interacts with the BIND9 thread model.
+        */
        status = mdb_env_open(env, view->new_zone_db,
-                             MDB_NOSUBDIR|MDB_CREATE, 0600);
+                             MDB_NOSUBDIR|MDB_NOTLS|MDB_CREATE, 0600);
        if (status != 0) {
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,