[ntp:questions] Re: ACTS - too many recvbufs allocated (40) (Correct the Version of ntp-dev)
Ronan Flood
ronan at noc.ulcc.ac.uk
Mon Feb 7 22:17:47 UTC 2005
cipo <cseplo_l at netlock.net> wrote:
> Without C1->C0 change in the modem initialization string (for the
> Europian time services of course) the serial port return 0 bytes.
> In ntp_io.c/void input_handler(l_fp *cts)
> select(maxactivefd+1,...) triggered,
> ...
> rb=get_free_recv_buffer(); buffer allocated
> ...
> rb->recv_length=read(fd,...); read 0 bytes !!!
> if(rb->recv_length == -1) {
> handled as error, buffer released.
> }
>
> But in the case of rb->recv_length=0, buffer remains allocated,
> select(...) triggered again, (in ntpd.c/service_main too) reading 0
> bytes again, 40 times, then the message in the subject appears. If the
> rb->recv_length=0 handled as above (buffer released, goto select_again)
"continue" is probably a better move than "goto select_again",
but that's a minor point.
> than there is an infinite loop with 100% proc consumed. Another approach
> is required.
> If C0 patch applied, this not happens.
> I don't now the correct solution yet.
Sounds like a hangup. Do you have anything connected to the DSR line
of the serial port? If so, you could try disconnecting that; which
should leave CLOCAL set on the port so that hangups are ignored -- see
refclock_open().
--
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