Date: Thu, 25 Feb 2010 16:26:22 -0600 From: Peter Steele <psteele@maxiscale.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: RE: ntpd hangs under FBSD 8 Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95991@MBX03.exg5.exghost.com> In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95765@MBX03.exg5.exghost.com> References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB385D60B7@MBX03.exg5.exghost.com> <bc2d971002220751i256f2329g3f29efdc763bca97@mail.gmail.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB385D60DD@MBX03.exg5.exghost.com> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95389@MBX03.exg5.exghost.com> <20100224190035.GA5026@wep4035.physik.uni-wuerzburg.de> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95522@MBX03.exg5.exghost.com> <20100225125838.13cd6c0e.ray@dlink.ua> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95689@MBX03.exg5.exghost.com> <20100225151828.GA2489@deviant.kiev.zoral.com.ua> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95703@MBX03.exg5.exghost.com> <20100225164514.GB2489@deviant.kiev.zoral.com.ua> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95765@MBX03.exg5.exghost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> We'll likely go with this solution instead of downgrading Python and the = related libraries. In fact I came up with another solution. I realized that since the problem = was related to the process signal mask, instead of called ntpd directly, wr= ap it up in a C app that resets the signal mask to something that works. I = have the following code: sigset_t set, oset; sigemptyset(&set); pthread_sigmask(SIG_SETMASK, &set, &oset); system("/usr/sbin/ntpd -g -q"); pthread_sigmask(SIG_SETMASK, &oset, NULL); I wrapped this up into a standalone app and call this from Python instead o= f calling ntpd directly. This solved the problem--no more hang. Thanks very= much to Kostik Belousov for his "wild guess" that this was related to the = process signal mask. His guess was dead on.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95991>