From owner-freebsd-net@FreeBSD.ORG Thu Oct 23 14:40:10 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B61D16A4B3 for ; Thu, 23 Oct 2003 14:40:10 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6A9743FBF for ; Thu, 23 Oct 2003 14:40:09 -0700 (PDT) (envelope-from sam@errno.com) Received: from 66.127.85.91 ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h9NLe70x009139 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 23 Oct 2003 14:40:09 -0700 (PDT) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: freebsd-net@freebsd.org Date: Thu, 23 Oct 2003 14:41:36 -0700 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310231441.36966.sam@errno.com> Subject: anyone believe this KASSERT? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 21:40:10 -0000 uipc_socket.c has a KASSERT in soreceive that I think is wrong. It dates from a long time ago but I can't tell exactly who created it since some intermediate munging buggered the CVS logs. cvs diff: Diffing . Index: uipc_socket.c =================================================================== RCS file: /usr/ncvs/src/sys/kern/uipc_socket.c,v retrieving revision 1.155 diff -u -r1.155 uipc_socket.c --- uipc_socket.c 21 Oct 2003 18:28:35 -0000 1.155 +++ uipc_socket.c 23 Oct 2003 20:33:04 -0000 @@ -855,9 +855,11 @@ (so->so_rcv.sb_cc < so->so_rcv.sb_lowat || ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat)) && m->m_nextpkt == 0 && (pr->pr_flags & PR_ATOMIC) == 0)) { +#if 0 KASSERT(m != 0 || !so->so_rcv.sb_cc, ("receive: m == %p so->so_rcv.sb_cc == %u", m, so->so_rcv.sb_cc)); +#endif if (so->so_error) { if (m) goto dontblock; In particular the m != 0 clause is suspicous since the enclosing if permits m to be 0 and the code inside carefully handles the case. I've been running w/o this assert for several weeks w/o a problem. Previously I was seeing it trip for NFS related traffic. Anyone care to justify keeping this? Sam