From owner-freebsd-current@FreeBSD.ORG Mon Aug 3 03:35:14 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21241065674 for ; Mon, 3 Aug 2009 03:35:14 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.freebsd.org (Postfix) with ESMTP id C4F498FC1A for ; Mon, 3 Aug 2009 03:35:14 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout2.cac.washington.edu (8.14.3+UW09.06/8.14.3+UW09.05) with ESMTP id n733Yqlh006034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 2 Aug 2009 20:34:53 -0700 X-Auth-Received: from [10.0.0.10] (c-76-126-186-111.hsd1.ca.comcast.net [76.126.186.111]) (authenticated authid=youshi10) by smtp.washington.edu (8.14.3+UW09.06/8.14.3+UW09.05) with ESMTP id n733YqvC020258 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 2 Aug 2009 20:34:52 -0700 Message-Id: <70966B4B-6BEA-4AFB-93D4-2DA8B6E33CD9@gmail.com> From: Garrett Cooper To: Kostik Belousov In-Reply-To: <20090802140530.GJ1884@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 2 Aug 2009 20:43:38 -0700 References: <20090802105033.GG1884@deviant.kiev.zoral.com.ua> <20090802123108.GY1292@hoeg.nl> <20090802140530.GJ1884@deviant.kiev.zoral.com.ua> X-Mailer: Apple Mail (2.935.3) X-PMX-Version: 5.5.7.378829, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2009.8.3.32717 X-Uwash-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGED_FROM_GMAIL 0.1, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_419_BODY_WEBMAIL 0, __FRAUD_419_WEBMAIL 0, __FRAUD_419_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MSGID_APPLEMAIL 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NS ' Cc: Ed Schouten , FreeBSD Current Subject: Re: HEAD tty seems to drop characters X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 03:35:15 -0000 On Aug 2, 2009, at 7:05 AM, Kostik Belousov wrote: > On Sun, Aug 02, 2009 at 02:31:08PM +0200, Ed Schouten wrote: >> Hi Kostik, >> >> * Kostik Belousov wrote: >>> I run a screen(1), where I tried to copy large portion of output and >>> paste it into vi. This resulted in the loss of the characters at >>> random >>> points inside the pasted text. >> >> I already took some time to investigate the issue. I have attached a >> patch that should already improve the situation: >> >> - write() on a pseudo-terminal master also accounted the data that >> was >> read into the kernel, but couldn't be passed to the TTY (which is >> likely to happen in non-blocking mode). >> >> - There was also a small unrelated issue; input on a TTY which has >> been >> configured in block (bypass) mode wouldn't set the input high water >> mark. >> >> For some reason, the data loss doesn't occur when SSHing to myself >> multiple times, but still causes screen(1) to drop some bytes later >> on. >> >> Even though it's always very easy to blame other applications, I >> suspect >> this may be because I reduced the input buffer size from 8 KB to 2 KB >> per pseudo-terminal. Maybe screen(1) can't deal with this. To be >> investigated... > At least, it is an improvement for me. Patch looks good. > Please consider this as an approval for the commit. SWEET! You may have fixed the bug that I reported (well, not officially) on #bsdports / #bsddev a while ago... someone else tested it though, and it passed for them so I thought it was just something funky with my setup. I suppose not :). I'll give it a shot too, once I have a chance. It was very easy to reproduce, but wasn't consistent for everyone, and the best way to reproduce it was to paste ~1k chars of text from Firefox to xterm (for instance).. -Garrett