From owner-freebsd-current Fri Jan 10 19:46:51 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 C68CB37B401; Fri, 10 Jan 2003 19:46:49 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 815A743F43; Fri, 10 Jan 2003 19:46:49 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 6A35D2A89E; Fri, 10 Jan 2003 19:46:49 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Tim Robbins Cc: Juli Mallett , current@FreeBSD.org Subject: Re: Serious issues with kqueue on sockets on CURRENT. In-Reply-To: <20030110215736.A31727@dilbert.robbins.dropbear.id.au> Date: Fri, 10 Jan 2003 19:46:49 -0800 From: Peter Wemm Message-Id: <20030111034649.6A35D2A89E@canning.wemm.org> 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 t o > > 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 In case anybody wants to play, I seem to recall some changes in uipc_socket.c that caused some problems (totally hosed the resolver) a while back: ---------------------------- revision 1.134 date: 2002/11/01 21:27:59; author: kbyanc; state: Exp; lines: +1 -1 Track the number of non-data chararacters stored in socket buffers so that the data value returned by kevent()'s EVFILT_READ filter on non-TCP sockets accurately reflects the amount of data that can be read from the sockets by applications. PR: 30634 Reviewed by: -net, -arch Sponsored by: NTT Multimedia Communications Labs MFC after: 2 weeks ---------------------------- revision 1.136 date: 2002/11/05 18:48:46; author: kbyanc; state: Exp; lines: +1 -1 Fix filt_soread() to properly flag a kevent when a 0-byte datagram is received. Verified by: dougb, Manfred Antar Sponsored by: NTT Multimedia Communications Labs ---------------------------- Is this related? Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message