From owner-freebsd-bugs Mon Jul 22 15:10:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37F6237B4AE for ; Mon, 22 Jul 2002 15:10:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 906FB43E70 for ; Mon, 22 Jul 2002 15:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6MMA2JU007176 for ; Mon, 22 Jul 2002 15:10:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6MMA2sK007175; Mon, 22 Jul 2002 15:10:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 816C637B400 for ; Mon, 22 Jul 2002 15:00:30 -0700 (PDT) Received: from gate.volant.org (gate.volant.org [207.111.218.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4444943E65 for ; Mon, 22 Jul 2002 15:00:29 -0700 (PDT) (envelope-from patl+freebsd@volant.org) Received: from 216-55-134-176.dsl.san-diego.abac.net ([216.55.134.176] helo=[192.168.0.13]) by gate.volant.org with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.33 #1) id 17WlEB-000P1b-00 for FreeBSD-gnats-submit@freebsd.org; Mon, 22 Jul 2002 15:00:27 -0700 Message-Id: <132290000.1027375208@mccaffrey.phoenix.volant.org> Date: Mon, 22 Jul 2002 15:00:08 -0700 From: Pat Lashley To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/40903: Busy_count is < 0 message keeps counting down Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 40903 >Category: kern >Synopsis: Busy_count is < 0 message keeps counting down >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 22 15:10:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Pat Lashley >Release: FreeBSD 4.6-STABLE i386 >Organization: >Environment: System: FreeBSD orwell.phoenix.volant.org 4.6-STABLE FreeBSD 4.6-STABLE #9: Mon Jun 24 14:21:35 PDT 2002 root@orwell.phoenix.volant.org:/usr/obj/usr/src/sys/ORWELL i386 >Description: Occasionally I find this machine in a loop emitting the message: "devstat_end_transaction: HELP!! busy_count for da0 is < 0 (*******)" to the console. The "*******" is a large negative number which counts down with each iteration. (Having apparently wrapped around from 0.) Sometimes it is da1 instead of da0. It seems to me that this is probably actually two problems. One is whatever is causing the busy_count go negative and the other is that it continues to decrement after going negative. >How-To-Repeat: I haven't been able to determine what triggers it - any preceeding message has long since scrolled off the console; and it doesn't leave any traces in the logs. It appears to happen early in the morning, generally when the daily periodic scripts are running; and often, but not always, while the nightly backups are running, though not necessarily accessing those disks. (This machine is the backup server for my LAN.) Da0 and da1 are Maxtor USB disks, the bulk of which are configured as a RAID mirror via vinum. (Don't ask.) There is also an IDE disk and an Adaptec 29160 attached to an Exabyte EZ17 tape library with a Mamoth drive. >Fix: I believe the following patch will prevent the hard loop as it tries to count down from 0xffffffff to zero: --- subr_devstat.c.~1~ Wed Aug 2 17:09:32 2000 +++ subr_devstat.c Mon Jul 22 11:02:48 2002 @@ -222,10 +222,12 @@ /* Add our busy time to the total busy time. */ timevaladd(&ds->busy_time, &busy_time); - } else if (ds->busy_count < 0) + } else if (ds->busy_count < 0) { printf("devstat_end_transaction: HELP!! busy_count " "for %s%d is < 0 (%d)!\n", ds->device_name, ds->unit_number, ds->busy_count); + ds->busy_count = 0 ; + } } void >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message