Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 1997 13:24:18 +0200 (CEST)
From:      oliver.fromme@heim3.tu-clausthal.de
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/3561: Timeout counter bug in /sys/i386/isa/wd.c
Message-ID:  <199705091124.NAA06853@posbi.heim3.tu-clausthal.de>
Resent-Message-ID: <199705091320.GAA00879@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3561
>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:04 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  <oliver.fromme@heim3.tu-clausthal.de>
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705091124.NAA06853>