From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 11 11:10:10 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A3D210656BC for ; Tue, 11 Jan 2011 11:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5F41D8FC13 for ; Tue, 11 Jan 2011 11:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0BBAAYh049856 for ; Tue, 11 Jan 2011 11:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0BBAAmw049855; Tue, 11 Jan 2011 11:10:10 GMT (envelope-from gnats) Date: Tue, 11 Jan 2011 11:10:10 GMT Message-Id: <201101111110.p0BBAAmw049855@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Sergey Kandaurov Cc: Subject: Re: bin/152525: ntpd(8) on 8.1 loops on select() with EBADF X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sergey Kandaurov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 11:10:10 -0000 The following reply was made to PR bin/152525; it has been noted by GNATS. From: Sergey Kandaurov To: bug-followup@FreeBSD.org, pluknet@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