From owner-freebsd-bugs@freebsd.org Tue Jan 10 12:27:13 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638F1CA6889 for ; Tue, 10 Jan 2017 12:27:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5307C1250 for ; Tue, 10 Jan 2017 12:27:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0ACRDYj091785 for ; Tue, 10 Jan 2017 12:27:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 215933] SCM_RIGHTS messages being lost, socket data being lost as well, with example code.. Date: Tue, 10 Jan 2017 12:27:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: ian@niw.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 12:27:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215933 --- Comment #1 from ian@niw.com.au --- By adding a small delay to the example code the problem becomes far more consistently repeatable. int main(int argc, char *argv[]){ int fds[2]; size_t total=3D0; if(socketpair(AF_UNIX,SOCK_STREAM,0,fds)=3D=3D0){ size_t sequence=3D0; int newpid=3Dfork(); if(newpid<0) exit(EX_OSERR); if(newpid=3D=3D0){ close(fds[1]); run_consumer(fds[0]); } close(fds[0]); printf("Master ready..\n"); for(size_t i=3D6000;i<8500;i++){ int tfd=3Dopen("/dev/null",O_WRONLY); total+=3Dsend_test_message(fds[1],sequence++,i,-1); total+=3Dsend_test_message(fds[1],sequence++,0,tfd); close(tfd); -----> usleep(100); } } printf("Master sent a total of %zd bytes\n",total); usleep(50000); exit(0); } With this change I have 100% consistent loss of data for large frame sizes = of=20 8154 to 8192 when using a local stream socket buffer size of 8192 bytes. --=20 You are receiving this mail because: You are the assignee for the bug.=