From owner-freebsd-bugs Fri May 9 06:20:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA00870 for bugs-outgoing; Fri, 9 May 1997 06:20:05 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA00863; Fri, 9 May 1997 06:20:02 -0700 (PDT) Resent-Date: Fri, 9 May 1997 06:20:02 -0700 (PDT) Resent-Message-Id: <199705091320.GAA00863@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, oliver.fromme@heim3.tu-clausthal.de Received: from posbi.heim3.tu-clausthal.de (posbi.heim3.tu-clausthal.de [139.174.243.161]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA27947 for ; Fri, 9 May 1997 04:24:31 -0700 (PDT) Received: (from root@localhost) by posbi.heim3.tu-clausthal.de (8.8.5/8.8.5) id NAA06853; Fri, 9 May 1997 13:24:18 +0200 (CEST) Message-Id: <199705091124.NAA06853@posbi.heim3.tu-clausthal.de> Date: Fri, 9 May 1997 13:24:18 +0200 (CEST) From: oliver.fromme@heim3.tu-clausthal.de Reply-To: oliver.fromme@heim3.tu-clausthal.de To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/3560: Timeout counter bug in /sys/i386/isa/wd.c Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3560 >Category: kern >Synopsis: Timeout counter bug in /sys/i386/isa/wd.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 9 06:20:01 PDT 1997 >Last-Modified: >Originator: Oliver Fromme >Organization: Technical University of Clausthal, Heim 3 >Release: FreeBSD 2.2.1-RELEASE i386 >Environment: The problem affects the reporting of timeouts in the IDE disk driver of FreeBSD 2.2.1-RELEASE. >Description: In file i386/isa/wd.c, function wdtimeout(), line 2080 (2.2.1-RELEASE): if(timeouts++ == 5) wderror((struct buf *)NULL, du, "Last time I say: interrupt timeout. Probably a portable PC."); else if(timeouts++ < 5) wderror((struct buf *)NULL, du, "interrupt timeout"); The problem should be obvious: The first wderror() ("Last time I say: ...") is _never_ executed, because timeouts==5 is never true at that location, since timeout is always incremented _twice_ if it's != 5. See the suggested fix below. >How-To-Repeat: Enable "IDE power down" in the BIOS, then boot FreeBSD 2.2.1 and wait until disk activity stops and the disk powers down (it may be necessary to kill cron and other processes which access the disk). Then access some file. During the power-up of the disk, the kernel displays "interrupt timeout". Repeat that procedure twice. On the third and subsequent repetition, no more timeout messages are displayed. In particular, "Last time I say: ..." is never displayed. >Fix: Suggested fix (should also be obvious): if(timeouts++ == 5) wderror((struct buf *)NULL, du, "Last time I say: interrupt timeout. Probably a portable PC."); else if(timeouts <= 5) wderror((struct buf *)NULL, du, "interrupt timeout"); Best regards Oliver Fromme >Audit-Trail: >Unformatted: