]> git.ipfire.org Git - thirdparty/bind9.git/commit
Request exclusive access when crashing via fatal()
authorOndřej Surý <ondrej@isc.org>
Fri, 22 Nov 2019 10:39:57 +0000 (11:39 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 26 Nov 2019 11:47:01 +0000 (12:47 +0100)
commit952d7fde63dbe68f1a2955688ea06edf9eacc9e2
treea70801d0b651db01e7be7d516df469e364ad9b5d
parentbfc041def1e4fcde265c37eedb81645ba526aae3
Request exclusive access when crashing via fatal()

When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.
bin/named/server.c