Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2009 20:43:38 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Ed Schouten <ed@80386.nl>, FreeBSD Current <current@freebsd.org>
Subject:   Re: HEAD tty seems to drop characters
Message-ID:  <70966B4B-6BEA-4AFB-93D4-2DA8B6E33CD9@gmail.com>
In-Reply-To: <20090802140530.GJ1884@deviant.kiev.zoral.com.ua>
References:  <20090802105033.GG1884@deviant.kiev.zoral.com.ua> <20090802123108.GY1292@hoeg.nl> <20090802140530.GJ1884@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <kostikbel@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?70966B4B-6BEA-4AFB-93D4-2DA8B6E33CD9>