From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5778 invoked by alias); 15 Jan 2013 11:14:46 -0000 Received: (qmail 5662 invoked by uid 48); 15 Jan 2013 11:14:23 -0000 From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/14500] socket data is truncated for data length ~ 4-5 K Date: Tue, 15 Jan 2013 11:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00105.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14500 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fweimer at redhat dot com --- Comment #4 from Florian Weimer 2013-01-15 11:14:21 UTC --- (In reply to comment #0) > //send a request > nbytes = send(s, msg, n, 0); //some request > if (nbytes < 0) {perror("send");return 1;} You should check the value of nbytes. Closing a streaming socket which still has unread data will abort the connection. Connection aborts are delivered out of order. Perhaps this is what you're seeing. (Stevens' UNIX Network Programming covers this corner case quite well.) -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.