NetBSD Problem Report #8628

Received: (qmail 23736 invoked from network); 15 Oct 1999 02:24:37 -0000
Message-Id: <199910150224.WAA00982@doppelganger.waterside.net>
Date: Thu, 14 Oct 1999 22:24:05 -0400 (EDT)
From: rafal@mediaone.net
Reply-To: rafal@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: switching wscons screens occasionally updates display incorrectly
X-Send-Pr-Version: 3.95

>Number:         8628
>Category:       kern
>Synopsis:       switching wscons screens can corrupt display
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jdolecek
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 15 23:27:01 +0000 1999
>Closed-Date:    Sat Jan 05 18:19:10 +0000 2008
>Last-Modified:  Sat Jan 05 18:19:10 +0000 2008
>Originator:     Rafal Boni
>Release:        -current from 10/10 or so
>Organization:
none
>Environment:
System: NetBSD doppelganger.waterside.net 1.4L NetBSD 1.4L (DOPPELGANGER) #1: Tue Oct 12 18:44:19 EDT 1999 root@groo-the-wanderer.waterside.net:/usr/src/sys/arch/i386/compile/DOPPELGANGER i386
	problem happens on my laptop with Neomagic MagicGraph 128XD

>Description:
	I'm running the following:
		screen 0: tail -f cvs-update-log (which was empty and not
			  changing)
		screen 1: tcpdump -i ne0
		screen 2: vmstat 5

	At some point, I switched from screen 1 to screen 2 and noticed
	that the *middle* of the screen contained data from screen 1.
	Switched to screen 3 (empty screen with login prompt) and back,
	but the "droppings" from screen 1 were still present on screen 2.

	Screen 1 seemed to contain the right data.

	It looks like screen 1 was in the middle of a scrolling action
	when I switched screens.

>How-To-Repeat:
	See above..
>Fix:
	None available.
>Release-Note:
>Audit-Trail:

From: Rafal Boni <rafal@mediaone.net>
To: Andy Doran <ad@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/8628: switching wscons screens occasionally updates display incorrectly 
Date: Sat, 16 Oct 1999 10:37:25 -0400

 In message <Pine.NEB.4.10.9910161309080.12413-100000@dns1.sports.gov.uk>, you w
 rite: 

 -> > 	At some point, I switched from screen 1 to screen 2 and noticed
 -> > 	that the *middle* of the screen contained data from screen 1.
 -> > 	Switched to screen 3 (empty screen with login prompt) and back,
 -> > 	but the "droppings" from screen 1 were still present on screen 2.
 -> 
 -> Are these single character errors or something nastier?

 Visually, it was much nicer than a single-character error... 8-) 

 About 15-20 rows of the switched-to screen contained data from the 
 switched-from screen.  So the switched-to screen looked like the following:

 <10 rows of data that belongs to the screen>
 <15-20 rows of data from previous screen>
 <rest of data from this screen>

 --rafal

 ----
 Rafal Boni                                                  rafal@mediaone.net

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: rafal@mediaone.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/8628: switching wscons screens occasionally updates display 
 incorrectly
Date: Mon, 06 Dec 1999 21:00:37 +0100

 rafal@mediaone.net said:
 > 	At some point, I switched from screen 1 to screen 2 and noticed
 > 	that the *middle* of the screen contained data from screen 1. 

 The only reason I can imagine is that the screen switch
 came in the middle of a scroll operation. I couldn't
 reproduce it -- it might be rather difficult to hit
 this time window, especially since scolling is done by
 moving a pointer instead of copying in most cases.

 However -- the change I just committed (vga.c rev. 1.22) makes
 the switch happening asynchronously, it can't occur in the middle
 of another operation anymore.
 Can you try whether you can still reproduce the bug?

 best regards
 Matthias


Responsible-Changed-From-To: kern-bug-people->jdolecek 
Responsible-Changed-By: jdolecek 
Responsible-Changed-When: Tue Jul 9 14:22:12 PDT 2002 
Responsible-Changed-Why:  
I can reproduce this with 1.6B kernel by running 'find / -print' on vt0 and 
(fast) switching between vt0 and vt1. Eventually, garbage appears on vt1. 
I'd look into this eventually. 
State-Changed-From-To: open->analyzed 
State-Changed-By: jdolecek 
State-Changed-When: Thu Dec 12 14:42:35 PST 2002 
State-Changed-Why:  
This still happens on 1.6K. When I run the find thing, vt1 would eventually 
contain single characters from vt0 screen. 

From: Christian Biere <christianbiere@gmx.de>
To: Richard Rauch <rkr@olib.org>
Cc: gnats-bugs@gnats.NetBSD.org, netbsd-bugs@netbsd.org
Subject: Re: kern/8628: Garbage can move between virtual terminals?
Date: Sun, 25 Jan 2004 03:00:37 +0100

 --mojUlQ0s9EVzWg2t
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 The attached patch seems to fix the problem of copying data from one
 VT to another whilst scrolling. It's surely overkill because you only
 need to lock against a VT switch and I'm not sure whether only 
 scrolling can cause characters appearing on the wrong VT.

 -- 
 Christian

 --mojUlQ0s9EVzWg2t
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="wsemul_vt100_subr.c.udif"

 Index: wsemul_vt100_subr.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/wscons/wsemul_vt100_subr.c,v
 retrieving revision 1.14
 diff -u -r1.14 wsemul_vt100_subr.c
 --- wsemul_vt100_subr.c	2003/04/02 18:22:56	1.14
 +++ wsemul_vt100_subr.c	2004/01/25 01:52:50
 @@ -60,7 +60,9 @@
  wsemul_vt100_scrollup(struct wsemul_vt100_emuldata *edp, int n)
  {
  	int help;
 +	int x;

 +	x = spltty();
  	if (n > edp->scrreg_nrows)
  		n = edp->scrreg_nrows;

 @@ -81,6 +83,7 @@
  	if (edp->dblwid)
  		memset(&edp->dblwid[edp->scrreg_startrow + help], 0, n);
  	CHECK_DW;
 +	splx(x);
  }

  /*
 @@ -90,7 +93,9 @@
  wsemul_vt100_scrolldown(struct wsemul_vt100_emuldata *edp, int n)
  {
  	int help;
 +	int x;

 +	x = spltty();
  	if (n > edp->scrreg_nrows)
  		n = edp->scrreg_nrows;

 @@ -111,6 +116,7 @@
  	if (edp->dblwid)
  		memset(&edp->dblwid[edp->scrreg_startrow], 0, n);
  	CHECK_DW;
 +        splx(x);
  }

  /*

 --mojUlQ0s9EVzWg2t--

From: David Laight <david@l8s.co.uk>
To: Christian Biere <christianbiere@gmx.de>
Cc: Richard Rauch <rkr@olib.org>, gnats-bugs@gnats.NetBSD.org,
  netbsd-bugs@netbsd.org
Subject: Re: kern/8628: Garbage can move between virtual terminals?
Date: Sun, 25 Jan 2004 18:59:08 +0000

 On Sun, Jan 25, 2004 at 03:00:37AM +0100, Christian Biere wrote:
 > The attached patch seems to fix the problem of copying data from one
 > VT to another whilst scrolling. It's surely overkill because you only
 > need to lock against a VT switch and I'm not sure whether only 
 > scrolling can cause characters appearing on the wrong VT.

 The other problem is that you lock out interrupts for a long time.
 This is especially bad if ISA bus timings apply to the scroll.
 (Which was the caes in a commercial Unix...)

 	David

 -- 
 David Laight: david@l8s.co.uk

From: jdolecek@NetBSD.org (Jaromir Dolecek)
To: Christian Biere <christianbiere@gmx.de>
Cc: Richard Rauch <rkr@olib.org>, gnats-bugs@gnats.NetBSD.org,
  netbsd-bugs@NetBSD.org
Subject: Re: kern/8628: Garbage can move between virtual terminals?
Date: Mon, 26 Jan 2004 11:24:24 +0100 (CET)

 Christian Biere wrote:
 > The attached patch seems to fix the problem of copying data from one
 > VT to another whilst scrolling. It's surely overkill because you only
 > need to lock against a VT switch and I'm not sure whether only 
 > scrolling can cause characters appearing on the wrong VT.

 Thanks for pinpointing the problem. I'll look into this on next
 weekend.

 Jaromir 
 -- 
 Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
 -=- We should be mindful of the potential goal, but as the Buddhist -=-
 -=- masters say, ``You may notice during meditation that you        -=-
 -=- sometimes levitate or glow.   Do not let this distract you.''   -=-
State-Changed-From-To: analyzed->feedback
State-Changed-By: jmmv@netbsd.org
State-Changed-When: Sat, 04 Nov 2006 18:44:06 +0000
State-Changed-Why:
Does this still happen?  I could reproduce it very easily in my machine but
last time I tried (more than a month ago) it'd not happen.  (I cannot
retest it at the moment.)


From: Rafal Boni <rafal@pobox.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/8628
Date: Sat, 05 Jan 2008 13:13:37 -0500

 The machine that I reported this on is long-dead, and I don't have any 
 head-full NetBSD machines that are powered on very often anymore, so I 
 don't even have anecdotal evidence of the problem still happening or not.

 I'd close it except for the fact that it looked like the analysis was 
 promising and people were still cooking up patches... but if not, feel 
 free to send this to the bug-bitbucket-in-the-sky.

State-Changed-From-To: feedback->closed
State-Changed-By: rafal@netbsd.org
State-Changed-When: Sat, 05 Jan 2008 18:19:10 +0000
State-Changed-Why:
Ok, I lied, I'm going to close it; don't have the hardware that the bug
was reported on, don't have any x86 headful NetBSD machines that are on
more than very sporadically.

So let's call it a feedback timeout (since the last real update was '04)
.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.