From: Juergen Perlinger Date: Tue, 3 Nov 2015 21:08:46 +0000 (+0100) Subject: [Bug 2954] Version 4.2.8p4 crashes on startup with sig fault X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c3dd8fb858880adb2b3fa8fec51fd64c6e3d89;p=thirdparty%2Fntp.git [Bug 2954] Version 4.2.8p4 crashes on startup with sig fault - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org bk: 5639225eI_gaHSFRVRx180afK5LkXA --- diff --git a/ChangeLog b/ChangeLog index c8ac44344..c60c8c660 100644 --- 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 (4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index a517391ba..931ac344f 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -27,12 +27,16 @@ #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 # 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