NetBSD Problem Report #42161

From stix@stix.id.au  Wed Oct  7 10:53:54 2009
Return-Path: <stix@stix.id.au>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D792863B8B6
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Oct 2009 10:53:54 +0000 (UTC)
Message-Id: <20091007105333.BB48C67FE5@stix.id.au>
Date: Wed,  7 Oct 2009 21:53:33 +1100 (EST)
From: stix@stix.id.au
Reply-To: stix@stix.id.au
To: gnats-bugs@gnats.NetBSD.org
Subject: systat(1) "The alternate system clock has died" annoying message
X-Send-Pr-Version: 3.95

>Number:         42161
>Category:       bin
>Synopsis:       systat(1) "The alternate system clock has died" annoying message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wiz
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 07 10:55:02 +0000 2009
>Closed-Date:    Wed Oct 28 09:35:26 +0000 2009
>Last-Modified:  Wed Oct 28 09:35:26 +0000 2009
>Originator:     Paul Ripke
>Release:        NetBSD 5.0_STABLE
>Organization:
>Environment:
System: NetBSD zion.stix.org.au 5.0_STABLE NetBSD 5.0_STABLE (ZION) #3: Fri Sep 11 18:21:34 EST 2009 stix@zion.stix.org.au:/export/netbsd/netbsd-5/obj.i386/export/netbsd/netbsd-5/src/sys/arch/i386/compile/ZION i386

Architecture: i386
Machine: i386
>Description:

I usually leave a "systat vm" running in GNU screen, and regularly
attach from varios xterms of differing sizes. Frequently, the SIGWINCH
results in systat saying "The alternate system clock has died" and
reverts to the 'pigs' display.

>How-To-Repeat:

See above.

>Fix:

The following patch fixes the issue for me - occasionally a rather blank
or slightly garbled screen is displayed, but this is cleaned up on the
next refresh. This is a rather obvious bug :)

Index: usr.bin/systat/syscall.c
===================================================================
RCS file: /usr/netbsd/cvsroot/src/usr.bin/systat/syscall.c,v
retrieving revision 1.5
diff -u -d -r1.5 syscall.c
--- usr.bin/systat/syscall.c	29 Apr 2008 06:53:04 -0000	1.5
+++ usr.bin/systat/syscall.c	7 Oct 2009 10:36:15 -0000
@@ -201,9 +201,8 @@
 		etime = cur.cp_etime;
 		/* < 5 ticks - ignore this trash */
 		if ((etime * hertz) < 1.0) {
-			if (failcnt++ > MAXFAIL)
+			if (failcnt++ <= MAXFAIL)
 				return;
-			failcnt = 0;
 			clear();
 			mvprintw(2, 10, "The alternate system clock has died!");
 			mvprintw(3, 10, "Reverting to ``pigs'' display.");
Index: usr.bin/systat/vmstat.c
===================================================================
RCS file: /usr/netbsd/cvsroot/src/usr.bin/systat/vmstat.c,v
retrieving revision 1.71
diff -u -d -r1.71 vmstat.c
--- usr.bin/systat/vmstat.c	13 Jul 2008 20:07:48 -0000	1.71
+++ usr.bin/systat/vmstat.c	7 Oct 2009 10:36:27 -0000
@@ -498,7 +498,7 @@
 		etime = cur.cp_etime;
 		/* < 5 ticks - ignore this trash */
 		if ((etime * hertz) < 1.0) {
-			if (failcnt++ > MAXFAIL)
+			if (failcnt++ <= MAXFAIL)
 				return;
 			clear();
 			mvprintw(2, 10, "The alternate system clock has died!");

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42161 CVS commit: src/usr.bin/systat
Date: Wed, 21 Oct 2009 13:56:36 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Wed Oct 21 13:56:36 UTC 2009

 Modified Files:
 	src/usr.bin/systat: syscall.c vmstat.c

 Log Message:
 Fix problems with SIGWINCH. From Paul Ripke in PR 42161.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/usr.bin/systat/syscall.c
 cvs rdiff -u -r1.73 -r1.74 src/usr.bin/systat/vmstat.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: bin-bug-people->wiz
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 21 Oct 2009 14:03:48 +0000
Responsible-Changed-Why:
I've committed the fix.


State-Changed-From-To: open->pending-pullups
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 21 Oct 2009 14:03:48 +0000
State-Changed-Why:
And requested a pullup for NetBSD-5.


From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42161 CVS commit: [netbsd-5] src/usr.bin/systat
Date: Tue, 27 Oct 2009 21:37:52 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Tue Oct 27 21:37:52 UTC 2009

 Modified Files:
 	src/usr.bin/systat [netbsd-5]: syscall.c vmstat.c

 Log Message:
 Pull up following revision(s) (requested by wiz in ticket #1110):
 	usr.bin/systat/vmstat.c: revision 1.74
 	usr.bin/systat/syscall.c: revision 1.7
 Fix problems with SIGWINCH. From Paul Ripke in PR 42161.


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.5.6.1 src/usr.bin/systat/syscall.c
 cvs rdiff -u -r1.71 -r1.71.4.1 src/usr.bin/systat/vmstat.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 28 Oct 2009 09:35:26 +0000
State-Changed-Why:
Pullup done.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.