Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2010 13:23:36 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, freebsd-python@freebsd.org
Subject:   Re: ntpd hangs under FBSD 8
Message-ID:  <20100226112336.GF2489@deviant.kiev.zoral.com.ua>
In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95991@MBX03.exg5.exghost.com>
References:  <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> <7B9397B189EB6E46A5EE7B4C8A4BB7CB39E95991@MBX03.exg5.exghost.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu, Feb 25, 2010 at 04:26:22PM -0600, Peter Steele wrote:
> > 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, wrap 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 of 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.

So this is arguably a Python bug. Did you contacted anybody who
cares about the Python ?

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkuHrzgACgkQC3+MBN1Mb4jFJwCcDNnuSfbIUExMzREKJOkYiCXz
jZsAn2H6LQChB1guq5NaUoZkKzeBsfiO
=v7X+
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100226112336.GF2489>