[ntp:questions] ACTS - too many recvbufs allocated (40) (Correct the Version of ntp-dev)

cipo cseplo_l at netlock.net
Mon Feb 7 16:46:19 UTC 2005


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) 
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.

More information about the questions mailing list