From owner-freebsd-arch@FreeBSD.ORG Mon Jun 2 17:58:44 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7449E377; Mon, 2 Jun 2014 17:58:44 +0000 (UTC) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1764F226B; Mon, 2 Jun 2014 17:58:44 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id a108so11524547qge.11 for ; Mon, 02 Jun 2014 10:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=3tt+uyI2NXmmucKC1cVTbGdHlNhGfeqhbMRHLSXYiNM=; b=SdjdM1B1T5aHMGSKNXS9OSpqu5CZOku7lQCYtjmjZPG+VlX+MAuF9gURSND+i/z+XG 6pn0GoZrDSUdKDDqSt7z2x2vNhOqx6asq3Oh1G7nzFBEAn0YA4YjVPjOwVbKYXuEnzAf jrdElAi8Qe2ex4KWY3oyHWrM43hmZi/p7GlKZpKsk46ITQaA/dKFK6eaeep8QL7y9YVd cK8io1hU1oAfIELiEihFK5sb2eRSJr2SSfUOYxz9kyM3FO+sE23nX+rruAeuNXDIimS6 Z5EDd2+pj2ZU3B8Aydl3wbodyN2gQLSv6VAPnR5wYVuRgGo/8L3EikjA1CORcb2s7ThH jlJQ== MIME-Version: 1.0 X-Received: by 10.140.104.195 with SMTP id a61mr47227330qgf.102.1401731922954; Mon, 02 Jun 2014 10:58:42 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.43.134 with HTTP; Mon, 2 Jun 2014 10:58:42 -0700 (PDT) Date: Mon, 2 Jun 2014 10:58:42 -0700 X-Google-Sender-Auth: OsEMorLcNE3AcXOPoVqJeh-p4Zw Message-ID: Subject: Seeing ENOTCAPABLE from write FDs in kqueue? From: Adrian Chadd To: Robert Watson , Pawel Jakub Dawidek , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 17:58:44 -0000 Hi guys/all, I've been tinkering with my RSS stuff where I have multiple listen sockets, one per worker thread, all terminating high throughput TCP transactions. It's all HTTP; I'm using libevent, evhttp and a very small amount of glue code to achieve this. libevent craps out from time to time because occasionally one of the events in kqueue returns ENOTCAPABLE. ENOTCAPABLE: ident=3D1686, filter=3D-2, flags=3D0x00004000, fflags=3D0x0000= 0000, data=3D93 ENOTCAPABLE: ident=3D1324, filter=3D-2, flags=3D0x00004000, fflags=3D0x0000= 0000, data=3D93 ENOTCAPABLE: ident=3D1740, filter=3D-2, flags=3D0x00004000, fflags=3D0x0000= 0000, data=3D93 ENOTCAPABLE: ident=3D1628, filter=3D-2, flags=3D0x00004000, fflags=3D0x0000= 0000, data=3D93 ENOTCAPABLE: ident=3D1199, filter=3D-2, flags=3D0x00004000, fflags=3D0x0000= 0000, data=3D93 ENOTCAPABLE: ident=3D818, filter=3D-2, flags=3D0x00004000, fflags=3D0x00000= 000, data=3D93 ENOTCAPABLE: ident=3D389, filter=3D-2, flags=3D0x00004000, fflags=3D0x00000= 000, data=3D93 It's happening on the various data FDs; not on the listen socket. What I'm seeing from ktrace: 27770 rss-http CAP operation requires , descriptor holds 27770 rss-http CAP operation requires , descriptor holds <> 27770 rss-http CAP operation requires , descriptor holds <> 27770 rss-http CAP operation requires , descriptor holds <> 27770 rss-http CAP operation requires , descriptor holds <> 27770 rss-http CAP operation requires , descriptor holds <> .. so, why exactly would I be seeing this? Is this some capability race where we have an FD setup but no capability yet assigned when it's added into the kqueue set? It's happening under high throughput (> 30,000 TCP sessions a second.) Where would I continue debugging this? Thanks! -a