Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2000 19:31:34 -0800
From:      "Scott Hess" <scott@avantgo.com>
To:        "Matthew Dillon" <dillon@apollo.backplane.com>
Cc:        <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: aio_read crashing certain kernels.
Message-ID:  <066e01bf6877$02deb550$1e80000a@avantgo.com>
References:   <01b301bf6824$46e928a0$1e80000a@avantgo.com> <200001262330.PAA16635@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Matthew Dillon" <dillon@apollo.backplane.com> wrote:
> :Since nobody here seems to be able to figure it out... I wrote a program
to
> :play around with aio_read(), and it ran stellarly well on my
> :FreeBSD3.4-release system using EIDE hard drives.  But, when I tried to
run
> :it on a system using our production kernel with Adaptec SCSI
controllers,
> :it locked the kernel up HARD.  No console messages, no Ctrl-Alt-Del, had
to
> :push the hard reset switch.
>
>     If you can reproduce the bug easily, can you post the program that
>     causes it plus instructions on how to reproduce the bug?  If one of
us
>     can reproduce it we may be able to squeeze more info out of the
crash.

The simplest program imaginable causes the problem (see included file for
an example).  Another item came to mind - SMP.  The boxes with the crashes
are SMP, the box without the crashes is not.  Since rfork(RFMEM) doesn't
work with SMP, and aio_read seems to be implemented by sharing memory with
an aiod process, perhaps it's the same issue?  [If so, perhaps it needs to
be returning an ENOTSUPP from aio_read :-).]

void main( void)
{
    int fd=open( "/tmp/myfile", O_RDONLY);
    char buf[ 1024];
    struct aiocb iocb;
    iocb.aio_fildes=fd;
    iocb.aio_offset=0;
    iocb.aio_buf=buf;
    iocb.aio_nbytes=sizeof( buf);
    iocb.aio_sigevent.sigev_notify=SIGEV_SIGNAL;
    iocb.aio_sigevent.sigev_signo=SIGIO;
    aio_read( &iocb);
}

Thanks,
scott




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?066e01bf6877$02deb550$1e80000a>