Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2009 15:21:46 +0200
From:      Thomas Backman <serenity@exscape.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        Kostik Belousov <kostikbel@gmail.com>, FreeBSD Current <current@freebsd.org>
Subject:   Re: HEAD tty seems to drop characters
Message-ID:  <4ACF3F62-44B9-4693-A1D3-8987848100C0@exscape.org>
In-Reply-To: <20090802123108.GY1292@hoeg.nl>
References:  <20090802105033.GG1884@deviant.kiev.zoral.com.ua> <20090802123108.GY1292@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

On Aug 2, 2009, at 14:31, 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...

Hmm, so I'm guessing this is the reason I've had trouble with copying/ 
pasting backtraces the last few days (I ssh into the box, which runs  
screen). I have, AFAIK, not noticed anything else than newlines  
dropping, though (I usually end up with lines such as  
"zfs_suspend_fs() at zfs_suspend_fs+0x2bzfs_ioc_recv() at zfs_ioc_recv 
+0x28b").

Also, do you know when this issue first appeared? I think I've been  
experiening this for more than a week or so, probably a lot longer  
(2-4 weeks? even longer)... could be sketchy memory, though.

Regards,
Thomas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ACF3F62-44B9-4693-A1D3-8987848100C0>