Date: Fri, 5 May 2000 16:39:28 -0400 (EDT) From: mdiclaud@cidera.com To: FreeBSD-gnats-submit@freebsd.org Subject: kern/18402: panic in aio_process Message-ID: <200005052039.QAA00410@vast1.dev.skycache.com>
next in thread | raw e-mail | index | archive | help
>Number: 18402
>Category: kern
>Synopsis: panic in aio_process
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 07 01:10:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Mike DiClaudio
>Release: FreeBSD 3.4-RELEASE i386
>Organization:
Cidera, Inc
>Environment:
* all sysctl values relating to AIO are untouched
* uname -a >> FreeBSD vast1.dev.skycache.com 3.4-RELEASE FreeBSD 3.4-RELEASE #2: Mon Apr 3 14:52:24 EDT 2000 toor@flash.skycache.com:/usr/src/sys/compile/VAST_DEBUG i386
>Description:
the system panics with fatal trap 12 in aio_process when the file is
close(2)'ed and there are outstanding aio requests.
>How-To-Repeat:
the problem occurred in a program i'm developing and the aio is mixed
in with lots of other stuff. this code-like sample illustrates what
i'm doing which is causing the problem. the code is zeroing the disk.
if you need the exact code, let me now
struct aiocb x[100];
int outstanding[100];
open(/dev/rda0)
for(i=0;i<100;i++)
{
/* setup x[ i ] values */
aio_write(&x[i]);
outstanding[i]=1;
}
close(/dev/rda0); /* bad thing to do here */
while( requests outstanding )
for(i=0;i<100;i++)
{
if( aio_error(&x[i]) == EINPROGRESS )
continue;
if( outstanding[i] )
{
aio_return(&x[i]);
outstanding[i]=0;
/* setup array for aio_suspend */
}
}
aio_suspend();
}
exit();
>Fix:
it works fine if close is called after the loop that is doing the aio_error
and aio_return calls, which is where it belongs to begin with.
>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?200005052039.QAA00410>
