RE: ntpd hangs under FBSD 8

2010-02-26 Thread Peter Steele
.5 and later, so clearly they changed how processes are launched from threads that has led to this problem. One should not have to be forced to make explicit calls to change the signal mask in order to launch an external app. Granted, we've only had this issue with ntpd--other apps launc

Re: ntpd hangs under FBSD 8

2010-02-26 Thread Kostik Belousov
ss 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, &

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
> 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

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Kostik Belousov
On Thu, Feb 25, 2010 at 09:57:48AM -0600, Peter Steele wrote: > >Very wild guess, check the process signal mask of the child for both methods > >of spawning. > > I'm running ntpd through Python. How do I check the process signal mask? I > did some quick searches an

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>Very wild guess, check the process signal mask of the child for both methods >of spawning. I'm running ntpd through Python. How do I check the process signal mask? I did some quick searches and it seems Python does not support sigprocmask(). In my searches I came across this

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Kostik Belousov
On Thu, Feb 25, 2010 at 08:12:05AM -0600, Peter Steele wrote: > >I think problem not in ntpd, since I use ntpdate. And in 50% times, when it > >run from startup script, it hangs with kernel. > >No Ctrl+C work, kernel don`t answer for ping, just freeze. > >Problem somew

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>I think problem not in ntpd, since I use ntpdate. And in 50% times, when it >run from startup script, it hangs with kernel. >No Ctrl+C work, kernel don`t answer for ping, just freeze. >Problem somewhere in kernel, maybe in subsystems that set new time, maybe in >network(UD

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Dag-Erling Smørgrav
Alexey Shuvaev writes: > The flag you should look at is '-g'. GCC supports debuggind symbols > together with -O2 optimizations. It is generally not a good idea to use -O2 for debugging versions, since gcc will optimize away many local variables. DES -- Dag-Erling Smørgrav - d...@des.no

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Alexey Shuvaev
hings and they all seemed to run correctly. > We use this same general approach in the full version of this script > to launch lots of applications. Its role in fact is a process > launcher/monitor. I stripped it down to the bare minimum in order > t

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Alexandr Rybalko
he full version of this >> script to launch lots of applications. Its role in fact is a process >> launcher/monitor. I stripped it down to the bare minimum >> in order to isolate the cause of the problem. It seems that only ntpd hangs, >> but not if I use Python 2.5.1. >

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>> make install should be done with DEBUG_FLAGS containing -g too, otherwise >> strip(1) is called on the installed binary. > >Doh, yes. I did not do this; that's likely my problem. Thanks. ___ freebsd-hackers@freebsd.org mailing list http://lists.freeb

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>I bet ntpd doesn't call select() in all that many places. Instead of going to >all this trouble to build a debugging libc, you could just >grep for select() and place breakpoints on all occurrences. (It might also be >obvious from looking at them which one is the offender.

Re: ntpd hangs under FBSD 8

2010-02-24 Thread John Baldwin
On Wednesday 24 February 2010 5:09:47 pm Kostik Belousov wrote: > On Wed, Feb 24, 2010 at 03:17:25PM -0500, John Baldwin wrote: > > On Wednesday 24 February 2010 1:17:50 pm Peter Steele wrote: > > > >You're going to need a debug version of libc, too. gdb won't be able to > > find a backtrace out

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Nate Eldredge
On Mon, 22 Feb 2010, Peter Steele wrote: Just out of curiosity, can you attach to the process via gdb and get a backtrace? This smells like a locked pthread_join I hit in my own code a few weeks ago I'm not using the debug version of ntpd so the backtrace isn't too useful, but her

Re: ntpd hangs under FBSD 8

2010-02-24 Thread Kostik Belousov
On Wed, Feb 24, 2010 at 03:17:25PM -0500, John Baldwin wrote: > On Wednesday 24 February 2010 1:17:50 pm Peter Steele wrote: > > >You're going to need a debug version of libc, too. gdb won't be able to > find a backtrace out of a libc function without it. > > > > What's the proper way to build a

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
sion of this script to launch lots of applications. Its role in fact is a process launcher/monitor. I stripped it down to the bare minimum in order to isolate the cause of the problem. It seems that only ntpd hangs, but not if I use Python 2.5.1. ___ fre

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>> What's the proper way to build a debug version of libc and the other >> libraries? I tried this: > >You can just do this: > >cd /usr/src/lib/libc >make clean >make DEBUG_FLAGS=-g >make install When I tried this the make actually failed with various errors. So I decided to do a full "make buil

Re: ntpd hangs under FBSD 8

2010-02-24 Thread John Baldwin
On Wednesday 24 February 2010 1:17:50 pm Peter Steele wrote: > >You're going to need a debug version of libc, too. gdb won't be able to find a backtrace out of a libc function without it. > > What's the proper way to build a debug version of libc and the other libraries? I tried this: You can

Re: ntpd hangs under FBSD 8

2010-02-24 Thread Alexey Shuvaev
e other > libraries? I tried this: > > export CFLAGS="-O0" > make buildworld > make installworld DESTDIR=/mydir > > and then copied libc.so.7 from /mydir/lib to the /lib dir on > my target system. I also replaced the ntpd binary with the debug version. > I can see th

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
nstallworld DESTDIR=/mydir and then copied libc.so.7 from /mydir/lib to the /lib dir on my target system. I also replaced the ntpd binary with the debug version. I can see that -O0 is being used in the various "cc" commands that are generated, but libc still doesn't seem to b

RE: ntpd hangs under FBSD 8

2010-02-22 Thread Peter Steele
>You're going to need a debug version of libc, too. gdb won't be able to find >a backtrace out of a libc function without it. Yeah, you're right. This is definitely an annoying bug... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.o

Re: ntpd hangs under FBSD 8

2010-02-22 Thread Ryan Stone
You're going to need a debug version of libc, too. gdb won't be able to find a backtrace out of a libc function without it. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any ma

RE: ntpd hangs under FBSD 8

2010-02-22 Thread Peter Steele
>Just out of curiosity, can you attach to the process via gdb and get a >backtrace? This smells like a locked pthread_join I hit in my own code a few >weeks 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 #

Re: ntpd hangs under FBSD 8

2010-02-20 Thread R. Tyler Ballance
On Fri, 19 Feb 2010, Peter Steele wrote: > I posted this originally on the -questions list but did not make any headway. > We have an application where the user can change the date/time via a GUI. One > of the options the user has is to specify that the time is to be synced using > ntp. Our co

ntpd hangs under FBSD 8

2010-02-19 Thread Peter Steele
moved to BSD 8 we've encountered a problem where the command that we initiate from the GUI: ntpd -g -q to perform the initial time sync is hanging indefinitely. Logs we've captured do not give any clues. This is the log from a BSD 7 system produced when this ntpd command is run:

Re: ntpd

2008-12-15 Thread vasanth raonaik
Thanks for your reply Max. I will start from that file and let you know if I need more info. Thanks, Vasanth ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-

Re: ntpd

2008-12-15 Thread Max Laier
On Monday 15 December 2008 14:07:26 vasanth raonaik wrote: > I am looking into the ntpd code. I need to know in which file and function > does ntpd reply/reponse query packets are formulated. Please provide any > pointers for the same. I don't know what "query packets" a

ntpd

2008-12-15 Thread vasanth raonaik
hello hackers, I am looking into the ntpd code. I need to know in which file and function does ntpd reply/reponse query packets are formulated. Please provide any pointers for the same. Thanks, Vasanth ___ freebsd-hackers@freebsd.org mailing list http

Re: ntpd jail problem

2008-06-08 Thread Eugene Grosbein
On Sun, Jun 08, 2008 at 12:25:00PM +0100, [EMAIL PROTECTED] wrote: > The problem is that the ntpd in the jail seems to believe that the host > clock is out of sync (from what I can gather), even though it isn't. That's because ntpd won't blindly assume that your host has ri

Re: ntpd jail problem

2008-06-08 Thread xorquewasp
On 20080608 22:10:27, Peter Jeremy wrote: > On 2008-Jun-08 11:32:54 +0100, [EMAIL PROTECTED] wrote: > >I'm running an openntpd instance on the host machine, which syncs the > >clock from the pool at pool.ntp.org. From the log output, ntpd claims to > >be synced and the ti

Re: ntpd jail problem

2008-06-08 Thread xorquewasp
On 20080608 19:56:03, Eugene Grosbein wrote: > On Sun, Jun 08, 2008 at 12:25:00PM +0100, [EMAIL PROTECTED] wrote: > > > The problem is that the ntpd in the jail seems to believe that the host > > clock is out of sync (from what I can gather), even though it isn't. > &

Re: ntpd jail problem

2008-06-08 Thread Peter Jeremy
On 2008-Jun-08 11:32:54 +0100, [EMAIL PROTECTED] wrote: >I'm running an openntpd instance on the host machine, which syncs the >clock from the pool at pool.ntp.org. From the log output, ntpd claims to >be synced and the time does seem to be correct. > >I'm then running a

Re: ntpd jail problem

2008-06-08 Thread Steven Hartland
I assume as it would effect the entire machine and hence should be run on the base machine instead, not the jail? - Original Message - From: <[EMAIL PROTECTED]> Anybody know why ntpd might not work in a jail? This e.mail is p

Re: ntpd jail problem

2008-06-08 Thread xorquewasp
On 20080608 12:19:23, Steven Hartland wrote: > I assume as it would effect the entire machine and hence should be run > on the base machine instead, not the jail? I think you might've misunderstood. The ntpd I'm running on the host syncs the clock (and therefore the whole machi

ntpd jail problem

2008-06-08 Thread xorquewasp
Anybody know why ntpd might not work in a jail? I'm running an openntpd instance on the host machine, which syncs the clock from the pool at pool.ntp.org. From the log output, ntpd claims to be synced and the time does seem to be correct. I'm then running another openntpd in a jail whi

Run ntpd as non-root user

2005-11-07 Thread Anatoli Klassen
Hi All, I have written patches to allow to run ntpd as ordinal user and/or from jail. The idea is to disable build-in kernel security checks by setting some sysctl's and then plug in a MAC module (actually it is the same approach as in mac_portacl to bind to low ports). There are fou

Re: ntpd and cmos clock update

2005-08-30 Thread John Hay
> : > : That's why I always thought that ntpd did not work in FreeBSD 5.x! > : > > : > ntpd works perfectly on FreebSD 5.x > : > : I think he refers to the fact that after a reboot, the time has to be > : adjusted by n seconds, so obviously the time that FreeBS

Re: ntpd and cmos clock update

2005-08-30 Thread Dan Nelson
In the last episode (Aug 30), Dag-Erling Smorgrav said: > John-Mark Gurney <[EMAIL PROTECTED]> writes: > > but since we don't set the TOD chip upon reboot, all the work that > > ntpd did over the previous reboot is lost... > > echo 'ntpdate_enable="YES&q

Re: ntpd and cmos clock update

2005-08-30 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> John-Mark Gurney <[EMAIL PROTECTED]> writes: : Warner Losh wrote this message on Mon, Aug 29, 2005 at 17:01 -0600: : > In message: <[EMAIL PROTECTED]> : > Dmitry Mityugov <[EMAIL PROTECTED]> writes: : > : That

Re: ntpd and cmos clock update

2005-08-30 Thread Dag-Erling Smørgrav
John-Mark Gurney <[EMAIL PROTECTED]> writes: > but since we don't set the TOD chip upon reboot, all the work that > ntpd did over the previous reboot is lost... echo 'ntpdate_enable="YES"' >>/etc/rc.conf DES

Re: ntpd and cmos clock update

2005-08-29 Thread John-Mark Gurney
Warner Losh wrote this message on Mon, Aug 29, 2005 at 17:01 -0600: > In message: <[EMAIL PROTECTED]> > Dmitry Mityugov <[EMAIL PROTECTED]> writes: > : That's why I always thought that ntpd did not work in FreeBSD 5.x! > > ntpd works perfectly on Freeb

Re: ntpd and cmos clock update

2005-08-29 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Dmitry Mityugov <[EMAIL PROTECTED]> writes: : That's why I always thought that ntpd did not work in FreeBSD 5.x! ntpd works perfectly on FreebSD 5.x Warner ___ freebsd-hackers@freebsd.org

Re: ntpd and cmos clock update

2005-08-29 Thread Dmitry Mityugov
; every time I reboot after long uptime period I see messages from ntpd > about adjusting clock by many seconds and such discrepancy should not > occur, of course, during couple of minutes that reboot takes. ... That's why I always thought that ntpd did not work in FreeBSD 5.x! -- Dmitry

ntpd and cmos clock update

2005-08-29 Thread Andriy Gapon
I think I saw more than once speculations that FreeBSD updates CMOS clock when time is set, so CMOS clock value should always be very close to internal OS timer. But I always took it with a grain of salt because every time I reboot after long uptime period I see messages from ntpd about adjusting

ntpd question

2004-11-29 Thread Alexander Timoshenko
) status: no carrier Note that rue0 has address 0.0.0.0 Now i'd like to sync time on the box using ntpd -q, and i got --- quote Nov 29 21:08:09 pbxbox ntpd[71729]: ntpd 4.2.0-a Wed Oct 20 14:36:02 EEST 2004 (1) Nov 29 21:08:09 pbxbox ntpd[71729]: no IPv6 interfaces found Nov 29 21: