Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2010 09:44:01 -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:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB385D60B7@MBX03.exg5.exghost.com>
In-Reply-To: <20100220113349.GA22800@kiwi.sharlinx.com>
References:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB385D5C73@MBX03.exg5.exghost.com> <20100220113349.GA22800@kiwi.sharlinx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>Just out of curiosity, can you attach to the process via gdb and get a bac=
ktrace? This smells like a locked pthread_join I hit in my own code a few w=
eeks ago

I'm not using the debug version of ntpd so the backtrace isn't too useful, =
but here's what I get:

(gdb) bt
#0  0x0000000800d52bfc in select () from /lib/libc.so.7
#1  0x0000000000425273 in ?? ()
#2  0x000000000040540e in ?? ()
#3  0x0000000800580000 in ?? ()
#4  0x0000000000000000 in ?? ()

The trace continues for 700+ entries. The first entry is useful enough thou=
gh. One of the parameters to select() is a timeout parameter. Every time I =
do the backtrace it's stuck on this select call so it seems they have an in=
finite timeout set. One of these was running all weekend in fact and it's s=
till stuck. Curiously, this problem only happens when we make the call from=
 code via a system() call. If I run the same command interactively, it neve=
r hangs:

# /usr/sbin/ntpd -g -q
ntpd: time set +28845.997063s

The same code that runs this command does not hang when we run it on a BSD =
7 box.=20

I think I'm going to have to build the debug version of ntpd and try to deb=
ug it. Definitely something weird going on.




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