I don't understand Hal's emergency fix.

Hal Murray hmurray at megapathdsl.net
Tue Dec 15 19:23:50 UTC 2015


esr at thyrsus.com said:
> You found it necessary to insert an emergency patch to get clock stepping
> working again.  But, as I read the code, that patch should not have been
> needed unless something was forcing ntpd into replay mode. 

There were two problems that may be getting confused.

I had a problem where stepping the clock wasn't working.  There was an 
obvious bug in the code, but I was running code that was 3 days old and you 
had already fixed it.

The up to date code crashed when I poked at a running server with ntpq -p.  
The intercepts for both sendpkt and recvpkt were unconditionally printing 
stuff before they had checked the mode.  In the recvpkt case, it was using 
unitialized info...

My patch was for the the latter problem.  It had nothing to do with stepping 
the clock.  You had already fixed that one.

I may not have analyzed the problem correctly, but my hack to ntp_intercept 
did fix the problems I was having and without it, even if it didn't crash, 
there was crap getting printed to stdout/stderr if you ran ntpd in -n mode so 
you could watch normal logging on the terminal or run from gdb.  (In normal 
daemon mode, stdout and stderr go to /dev/null so crap printout doesn't 
bother anybody.)


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list