bin/152525: ntpd(8) on 8.1 loops on select() with EBADF

Sergey Kandaurov pluknet at gmail.com
Tue Jan 11 11:10:10 UTC 2011


The following reply was made to PR bin/152525; it has been noted by GNATS.

From: Sergey Kandaurov <pluknet at gmail.com>
To: bug-followup at FreeBSD.org, pluknet at gmail.com
Cc:  
Subject: Re: bin/152525: ntpd(8) on 8.1 loops on select() with EBADF
Date: Tue, 11 Jan 2011 14:03:29 +0300

 Some more details and investigations.
 
 This situation reproduces iff there are over 1000 IP assigned on interface.
 I suspect select() behaves incorrectly on such fd_set size of listen sockets.
 
 [unmodified ntpd as in 8]# sockstat | grep ntpd | grep '\:123' | wc -l
      999
 
 [unmodified ntpd as in 8]# top -bI | grep ntpd
  1478 root             1 113    0 11736K  3428K CPU3    3 429.7H 75.78% ntpd
 
 The possible correction is in updating ntpd to the latest stable ntpd
 version that supports listening on a specified subset of sockets.
 
 So I've updated ntpd to 4.2.6p2 on one of the problem boxes,
 and that reduced the number of listened sockets to 6.
 
 [ntpd 4.2.6]# sockstat | grep ntpd | grep '\:123' | wc -l
        6
 
 That seems to fix the reported issue.
 
 -- 
 wbr,
 pluknet


More information about the freebsd-bugs mailing list