]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2954] Version 4.2.8p4 crashes on startup with sig fault
authorJuergen Perlinger <perlinger@ntp.org>
Tue, 3 Nov 2015 21:08:46 +0000 (22:08 +0100)
committerJuergen Perlinger <perlinger@ntp.org>
Tue, 3 Nov 2015 21:08:46 +0000 (22:08 +0100)
 - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org

bk: 5639225eI_gaHSFRVRx180afK5LkXA

ChangeLog
ntpd/ntpd.c

index c8ac4434458dc9716643f0d9d169c887de8ea081..c60c8c6603ef7634290525465f07235bafb8f2fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 ---
 * [Bug 2954] Version 4.2.8p4 crashes on startup with sig fault
   - fixed data race conditions in threaded DNS worker. perlinger@ntp.org
+  - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org
 ---
 (4.2.8p4) 2015/10/21 Released by Harlan Stenn <stenn@ntp.org>
 (4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn <stenn@ntp.org>
index a517391ba522f0574679626e708ca4a79f7a77b8..931ac344f4d61f890b81d6860e228944e882a84c 100644 (file)
 #include "ntp_libopts.h"
 #include "ntpd-opts.h"
 
-/* there's a short treatise below what the thread stuff is for */
+/* there's a short treatise below what the thread stuff is for.
+ * [Bug 2954] enable the threading warm-up only for Linux.
+ */
 #if defined(HAVE_PTHREADS) && HAVE_PTHREADS && !defined(NO_THREADS)
 # ifdef HAVE_PTHREAD_H
 #  include <pthread.h>
 # endif
-# define NEED_PTHREAD_WARMUP
+# if defined(linux)
+#  define NEED_PTHREAD_WARMUP
+# endif
 #endif
 
 #ifdef HAVE_UNISTD_H
@@ -269,6 +273,9 @@ static void library_unexpected_error(const char *, int,
  * This uses only the standard pthread API and should work with all
  * implementations of pthreads. It is not necessary everywhere, but it's
  * cheap enough to go on nearly unnoticed.
+ *
+ * Addendum: Bug 2954 showed that the assumption that this should work
+ * with all OS is wrong -- at least FreeBSD bombs heavily.
  */
 #ifdef NEED_PTHREAD_WARMUP