From owner-svn-src-head@FreeBSD.ORG Fri Mar 7 23:08:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6707DDB; Fri, 7 Mar 2014 23:08:53 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A627DADB; Fri, 7 Mar 2014 23:08:52 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id w61so5919593wes.18 for ; Fri, 07 Mar 2014 15:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QK/8PIO9Mpi+XvduIeulBrXgdZJkIKhhRxxJ4NTGhtg=; b=Yy6+F2O6d4sy/FFhNQnUwhxQLTLXUlvMozvJRufoiiQARoExIoEGyS3WWSoiaR7RHq 8q5izw0n3sNPeRhJFrbgYi6WqxpfF+Q5Woyd4iqrYsDuehaIcVfYaiSUISTw0caPRa1b ExjjtmzSLStDyf9S6WDb6mr2jesDqZbCbmT2+kOU/J9BiU0G3ryhTzizTaJOjV+pbm/J mN29X1duBEmaf8Iv3ITOPmNHqWvuYHGh0NVyTlRu3QKxjCNiY/lX1iOhmVznTnzlmVWa RpnfnJXcUgG7uzaDldxCWe/4lTol1Ckm9PBh/5jNE5PMTE3QqTDYULGw/3ZDCZbSXPNV QGkA== MIME-Version: 1.0 X-Received: by 10.180.97.37 with SMTP id dx5mr640855wib.53.1394233731200; Fri, 07 Mar 2014 15:08:51 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.168.197 with HTTP; Fri, 7 Mar 2014 15:08:51 -0800 (PST) In-Reply-To: <20140307225800.GG80022@FreeBSD.org> References: <201403062024.s26KOFcI085288@svn.freebsd.org> <20140307225800.GG80022@FreeBSD.org> Date: Fri, 7 Mar 2014 16:08:51 -0700 X-Google-Sender-Auth: DkpTaOkfCD5GsQm8PH_fbE5YoR4 Message-ID: Subject: Re: svn commit: r262867 - in head: sys/kern sys/sys tests/sys/kern From: Alan Somers To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Alan Somers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2014 23:08:53 -0000 On Fri, Mar 7, 2014 at 3:58 PM, Gleb Smirnoff wrote: > Alan, > > On Thu, Mar 06, 2014 at 08:24:15PM +0000, Alan Somers wrote: > A> Author: asomers > A> Date: Thu Mar 6 20:24:15 2014 > A> New Revision: 262867 > A> URL: http://svnweb.freebsd.org/changeset/base/262867 > A> > A> Log: > A> Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical > A> buffers drop packets". It was caused by a check for the space available > A> in a sockbuf, but it was checking the wrong sockbuf. > A> > A> sys/sys/sockbuf.h > A> sys/kern/uipc_sockbuf.c > A> Add sbappendaddr_nospacecheck_locked(), which is just like > A> sbappendaddr_locked but doesn't validate the receiving socket's > A> space. Factor out common code into sbappendaddr_locked_internal(). > A> We shouldn't simply make sbappendaddr_locked check the space and > A> then call sbappendaddr_nospacecheck_locked, because that would cause > A> the O(n) function m_length to be called twice. > A> > A> sys/kern/uipc_usrreq.c > A> Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets, > A> because the receiving sockbuf's size limit is irrelevant. > A> > A> tests/sys/kern/unix_seqpacket_test.c > A> Now that 185813 is fixed, pipe_128k_8k fails intermittently due to > A> 185812. Make it fail every time by adding a usleep after starting > A> the writer thread and before starting the reader thread in > A> test_pipe. That gives the writer time to fill up its send buffer. > A> Also, clear the expected failure message due to 185813. It actually > A> said "185812", but that was a typo. > > Can you please look at 181741? Seems very much related. > > -- > Totus tuus, Glebius. Yes, it's related. The difference is that 181741 deals with sbappendcontrol_locked, but 185813 deals with sbappendaddr_locked. Similar functions that both had the same problem. Also, see my comments in the bug tracker for 181741. -alan