[ntp:questions] Re: ACTS - too many recvbufs allocated (40) (Correct the Version of ntp-dev)
Ronan Flood
ronan at noc.ulcc.ac.uk
Thu Feb 10 13:03:21 UTC 2005
Danny Mayer <mayer at gis.net> wrote:
> The quick fix is to change the following lines in ntpd/ntp_io.c in
> input_handler():
> rb->recv_length =
> read(fd, (char *)&rb->recv_space, (unsigned)i);
>
> if (rb->recv_length == -1)
> {
> netsyslog(LOG_ERR, "clock read fd %d: %m", fd);
> freerecvbuf(rb);
> goto select_again;
> }
> to:
>
> rb->recv_length =
> read(fd, (char *)&rb->recv_space, (unsigned)i);
>
> if (rb->recv_length <= 0 || errno != 0)
> {
> netsyslog(LOG_ERR, "clock read fd %d: %m", fd);
> freerecvbuf(rb);
> goto select_again;
> }
>
> This should take care of the problem. I will put a better fix into the
> sources over the next few days.
That addresses the symptom rather than the cause, which is a hangup
owing to carrier dropping. With the above change in place, I'd expect
a continuous stream of "clock read" messages, CPU maxed, and no other
input will happen because "goto select_again" picks up the error condition
each time round and never does anything else. "continue" would be better
if you have an error condition: move on to the next clock/interface.
That was my experience dealing with PPS on a SunFire V210 serial port
under Solaris 8 -- see comment #23 on bugzilla id 341
http://bugzilla.ntp.org/show_bug.cgi?id=341#c23
Is the code in refclock_open() to turn off CLOCAL if DSR is on, in the
right place? That's for PPS according to the comment, so maybe should
be in atom_start(), and independently in drivers that handle PPS directly
themselves?
--
Ronan Flood <R.Flood at noc.ulcc.ac.uk>
working for but not speaking for
Network Services, University of London Computer Centre
(which means: don't bother ULCC if I've said something you don't like)
More information about the questions
mailing list