From owner-freebsd-current Fri Jan 10 3:40:48 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 6810437B401; Fri, 10 Jan 2003 03:40:46 -0800 (PST) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED80F43E4A; Fri, 10 Jan 2003 03:40:43 -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 h0ABegT08753; Fri, 10 Jan 2003 09:40:42 -0200 Message-ID: <3E1EB139.6080701@tcoip.com.br> Date: Fri, 10 Jan 2003 09:40:41 -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: Tim Robbins Cc: 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> 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 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. -- 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 On Monday mornings I am dedicated to the proposition that all men are created jerks. -- H. Allen Smith, "Let the Crabgrass Grow" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message