From nobody@FreeBSD.org  Sun Dec 31 12:50:24 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 0644C37B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 31 Dec 2000 12:50:24 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id eBVKoNu03852;
	Sun, 31 Dec 2000 12:50:23 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200012312050.eBVKoNu03852@freefall.freebsd.org>
Date: Sun, 31 Dec 2000 12:50:23 -0800 (PST)
From: sthg@hotmail.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: Debug string typo
X-Send-Pr-Version: www-1.0

>Number:         23987
>Category:       kern
>Synopsis:       Debug string typo
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 31 13:00:01 PST 2000
>Closed-Date:    Sun Dec 31 14:11:05 PST 2000
>Last-Modified:  Sun Dec 31 14:11:40 PST 2000
>Originator:     Stephen Grau
>Release:        4.1-RELEASE
>Organization:
>Environment:
FreeBSD xanadu.limgrau.org 4.1-RELEASE FreeBSD 4.1-RELEASE #1: Sun Dec 31 20:45:19 EST 2000     stg@xanadu.limgrau.org:/usr/src/sys/compile/FIREWALL9  i386
>Description:
When having problems with microuptime going backwards, the symptoms look worse due to a typo in the debug message. Instead of a period, the second time is printed with a comma (in /usr/src/sys/kern/kern_synch.c). For example:

Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688450.094451 -> 688450,-695028036)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (6884ckwards (688451.905274 -> 688451,885155)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688451.905274 -> 688451,899963)
Dec 31 23:01:37 xanadu /kernel: microuptime() went backwards (688451.942972 -> 688451,923447)


Also note that there is at least one other bug resulting in a negative usec value, probably subtracting when it should be adding, that I was not able to find.
This comma has been a problem since 4.0 and still exists in 4.2.

>How-To-Repeat:

>Fix:
Sorry, I don't know how to do a useful diff.

/usr/src/sys/kern/$ diff kern_synch.c*
825c825
<               printf("microuptime() went backwards (%ld.%06ld -> %ld.%06ld)\n",
---
>               printf("microuptime() went backwards (%ld.%06ld -> %ld,%06ld)\n",


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Sun Dec 31 14:11:05 PST 2000 
State-Changed-Why:  
This was already fixed in rev1.91 of kern_synch.c, but never merged: 

Checking in kern_synch.c; 
/home/ncvs/src/sys/kern/kern_synch.c,v  <--  kern_synch.c 
new revision: 1.87.2.3; previous revision: 1.87.2.2 
done 

... so I merged it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23987 
>Unformatted:
