From owner-freebsd-current Fri Jan 10 5:26:12 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EB7137B401; Fri, 10 Jan 2003 05:26:10 -0800 (PST) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62D1143E4A; Fri, 10 Jan 2003 05:26:05 -0800 (PST) (envelope-from dcs@tcoip.com.br) Received: from tcoip.com.br ([10.0.2.6]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id h0ADPkT10901; Fri, 10 Jan 2003 11:25:46 -0200 Message-ID: <3E1EC9DA.50008@tcoip.com.br> Date: Fri, 10 Jan 2003 11:25:46 -0200 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021212 X-Accept-Language: en-us, en, pt-br, ja MIME-Version: 1.0 To: "Daniel C. Sobral" Cc: Tim Robbins , Juli Mallett , current@FreeBSD.ORG, re@FreeBSD.ORG Subject: Re: Serious issues with kqueue on sockets on CURRENT. References: <20030110013015.A23399@FreeBSD.org> <20030110215736.A31727@dilbert.robbins.dropbear.id.au> <3E1EB139.6080701@tcoip.com.br> In-Reply-To: <20030110013015.A23399@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel C. Sobral wrote: > Tim Robbins wrote: > > > On Fri, Jan 10, 2003 at 01:30:16AM -0800, Juli Mallett wrote: > > > > > > >Lately, the data field for sockets, which holds bytes ready (in the > > EVFILT_ > > >READ case) to be read, is computed to be zero. This means that if > > you have > > >a low watermark which is >0 per the kq, THE EVENT WILL NEVER HAPPEN. > > Not to > > >mention that this means when the event IS triggered properly (if > you can > > >call it that), it is always said to have =ZERO= bytes ready. > > > > [...] > > > > I can definitely reproduce this here and also fairly angry about it. > > In addition to what you mentioned, fstat() gives an incorrect st_size > > result now and it's likely that non-NOTE_LOWAT low watermarks are > > firing too early as well. > > > > Ugly test program @ http://people.freebsd.org/~tjr/kq.c > > > If I ensure the write only happens after the child is waiting on kq, the > bug does not show up for me. ...because the close() wakes kevent. Indeed, this is completely reproducable here (RELENG_5_0). -- Daniel C. Sobral (8-DCS) Gerencia de Operacoes Divisao de Comunicacao de Dados Coordenacao de Seguranca TCO Fones: 55-61-313-7654/Cel: 55-61-9618-0904 E-mail: Daniel.Capo@tco.net.br Daniel.Sobral@tcoip.com.br dcs@tcoip.com.br Outros: dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net Q: How was Thomas J. Watson buried? A: 9 edge down. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message