diff --git a/bind-named-hangs-or-cransh.patch b/bind-named-hangs-or-cransh.patch new file mode 100644 index 0000000000000000000000000000000000000000..09f0bc354e0e7bab2972f49a8c93ccddeb0e9e22 --- /dev/null +++ b/bind-named-hangs-or-cransh.patch @@ -0,0 +1,112 @@ +diff --git a/configure.in b/configure.in +index afdbe77..df40dba 100644 +--- a/configure.in ++++ b/configure.in +@@ -4217,71 +4217,53 @@ AC_CHECK_FUNCS(nanosleep usleep explicit_bzero) + # + # Machine architecture dependent features + # +-have_stdatomic=no +-AC_MSG_CHECKING(for usable stdatomic.h) +-AC_TRY_COMPILE([ +-#include +-#include +-], +-[ +-atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); +-], +- [AC_MSG_RESULT(yes) +- have_stdatomic=yes +- ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"], +- [AC_MSG_RESULT(no) +- have_stdatomic=no +- ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"]) +- + AC_ARG_ENABLE(atomic, + AS_HELP_STRING([--enable-atomic], +- [enable machine specific atomic operations [default=autodetect]]), ++ [enable machine specific atomic operations [default=nostd]]), + enable_atomic="$enableval", +- enable_atomic="autodetect") ++ enable_atomic="nostd") + case "$enable_atomic" in +- yes|''|autodetect) +- case "$host" in +- powerpc-ibm-aix*) +- if test "X$GCC" = "Xyes"; then +- AC_MSG_CHECKING([if asm("ics"); works]) +- AC_TRY_COMPILE(,[ +- main() { asm("ics"); exit(0); } +- ], +- [AC_MSG_RESULT(yes) +- use_atomic=yes], +- [ +- saved_cflags="$CFLAGS" +- CFLAGS="$CFLAGS -Wa,-many" +- AC_TRY_RUN([ +- main() { asm("ics"); exit(0); } +- ], +- [AC_MSG_RESULT([yes, required -Wa,-many]) +- use_atomic=yes], +- [AC_MSG_RESULT([no, use_atomic disabled]) +- CFLAGS="$saved_cflags" +- use_atomic=no], +- [AC_MSG_RESULT([cross compile, assume yes]) +- CFLAGS="$saved_cflags" +- use_atomic=yes]) +- ] +- ) +- else +- use_atomic=yes +- fi +- ;; +- *) +- use_atomic=yes +- ;; +- esac ++ yes) ++ use_stdatomic=yes ++ use_atomic=yes ++ ;; ++ nostd) ++ use_stdatomic=no ++ use_atomic=yes + ;; + no) +- have_stdatomic=no +- ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" ++ use_stdatomic=no + use_atomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" + arch=noatomic + ;; + esac + ++if test "X$use_stdatomic" = "Xyes"; then ++ have_stdatomic=no ++ AC_MSG_CHECKING(for usable stdatomic.h) ++ AC_TRY_COMPILE([ ++ #include ++ #include ++ ], ++ [ ++ #if ATOMIC_INT_LOCK_FREE == 2 && ATOMIC_LONG_LOCK_FREE == 2 ++ atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); ++ #else ++ #error stdatomic not lock free ++ #endif ++ ], ++ [AC_MSG_RESULT(yes) ++ have_stdatomic=yes ++ ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"], ++ [AC_MSG_RESULT(no) ++ have_stdatomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"]) ++else ++ have_stdatomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" ++fi ++ + if test "X$have_stdatomic" = "Xyes"; then + AC_MSG_CHECKING(if -latomic is needed to use 64-bit stdatomic.h primitives) + AC_LINK_IFELSE( diff --git a/bind.spec b/bind.spec index 10dd7ce34dcec25347ae070e5f7db0d3f17f7d00..e48c3656874e31eba3ab167221f542a9e368f64a 100644 --- a/bind.spec +++ b/bind.spec @@ -17,7 +17,7 @@ Name: bind Summary: Domain Name System (DNS) Server (named) License: MPLv2.0 Version: 9.11.4 -Release: 13 +Release: 14 Epoch: 32 Url: http://www.isc.org/products/BIND/ Source0: https://ftp.isc.org/isc/bind9/9.11.4/bind-%{version}-P2.tar.gz @@ -140,6 +140,7 @@ Patch6020: CVE-2019-6465.patch Patch9000: feature-bind99-euler-range-port.patch Patch9001: bugfix-nslookup-norec.patch Patch9002: bugfix-named-log-time.patch +Patch9003: bind-named-hangs-or-cransh.patch %description Berkeley Internet Name Domain (BIND) is an implementation of the Domain Name @@ -371,6 +372,7 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools %patch6019 -p1 %patch6020 -p1 %patch9002 -p1 +%patch9003 -p1 %build %define _configure "../configure" @@ -1045,6 +1047,12 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Mar 26 2020 wangli - 9.11.4-14 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:fix named service hangs and crashes + * Thu Mar 19 2020 songnannan - 9.11.4-13 - add gdb in buildrequires