Date: Tue, 14 Mar 2000 20:39:37 +0100 (CET) From: jan@vandenbosch.org To: FreeBSD-gnats-submit@freebsd.org Subject: i386/17374: Bug with fix - Archive QIC02 tape-unit device randomly halts. Message-ID: <200003141939.UAA01066@jvdbosch.icts.tue.nl>
next in thread | raw e-mail | index | archive | help
>Number: 17374
>Category: i386
>Synopsis: Archive QIC02 tape-unit device randomly halts.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 14 11:50:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Jan van den Bosch
>Release: FreeBSD 3.2-RELEASE i386
>Organization:
Jan van den Bosch (The Netherlands)
>Environment:
i486 PC, 8 MB, QIC02 Archive tapedrive
>Description:
The wt QIC02 tapedriver in thwe FreeBSD 3.x has a nice bug (could be
also in NetBSD and other BSD's ???)
The wt driver sometimes comes in a deadlock state (waiting for an
wake-up event that never occurs). It may happen when you are doing
longer backups on - I assume - some "slow" PC's like mine.
The backup does not finish correctly, it "hangs".
The code is in /sys/i386/isa/wt.c.
The solution is simple. After changing it,
the bug never occurred (to me) again.
Reason:
In the Interrupt routine wtintr() there is no provision for
stopping the timeout() if all i/o (one block) is completed
(state 'i/o finished'). If an interrupt is generated at this moment,
it comes in an unexpected state ('continue i/o'). In this state,
there is of course no wakeup, so it keeps sleeping ...
Patch:
*Allways put the timer off* if i/o is finished.
Add this line in the function body of wtintr(sc):
untimeout(wtimer, (caddr_t)t, t->co_handler);
See context-diff below.
Remark:
In NetBSD ther is no call-out handler, the patch is even
more simple.
>How-To-Repeat:
Problem shows up every time I was making a longer backup,
on my old 486 PC system.
(May be on a fast system it does not occure, because it is a timing problem)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003141939.UAA01066>
