[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntpdate for Hurd?



On Fri, 2011-06-10 at 14:25 +0200, Svante Signell wrote:
> On Tue, 2011-06-07 at 15:09 +0200, Thomas Schwinge wrote:
> > Hallo!
> > 
> > On Tue, 7 Jun 2011 12:46:59 +0200, Samuel Thibault <sthibault@debian.org> wrote:
> > > Svante Signell, le Tue 07 Jun 2011 10:48:04 +0200, a écrit :
> > > > Is there a possibility to make ntpdate to work, even if ntpd does not?
> > > 
> > > I'd say yes: mach has coarse-grain time adjustment.
..
> Hi, looks like ntpdate (ipv4) works for querying and setting the time.
> However, ipv6 does not work, and the ntp package has to be disabled.
> Looks promising though. More later.

Update: 
Now ntdate does not hang when using -4 or -6 switches, but in gdb it
hangs for all combinations of switches.

Looks like the hang is at the same place, independent of if poll() or
select() is used, see code snippet. Hangs after first call and a new
thread created: 
gdb:
[New Thread 22736.5]
21 Jun 15:01:28 ntpdate[22736]: setsockopt() IPV6_V6ONLY failed:
Protocol not available
calling select, maxfd=7, rdfdes=96 <-my printf
[New Thread 22736.6]
HANG HERE

#ifdef HAVE_POLL_H
 nfound = poll(rdfdes,(unsigned int)nbsock,timeout.tv_sec*1000); <-here
#else
nfound=select(maxfd,&rdfdes,(fd_set *)0,(fd_set *)0,&timeout); <-here
#endif
if (nfound > 0)
     input_handler();
else if (nfound == SOCKET_ERROR)
{...etc

Stack corruption?? How to find out??

Complete backtraces:
Using poll: http://paste.debian.net/120528/
Using select: http://paste.debian.net/120552/


Reply to: