2003-07-07 21:48:41

by Chen, Kenneth W

[permalink] [raw]
Subject: Bug fix in AIO initialization

We hit this bug when we have the following scenario:

One process initializes an AIO context and then forks out many child
processes. When those child processes exit, many BUG checks
(effectively kernel oops) were triggered from put_ioctx(ctx) in function
exit_aio().

The issue was that the AIO context was incorrectly copied upon forking
and mislead all child processes to think they have an IO context and
trying to free it where they really don't own. The following patch fix
the issue.

- Ken


Attachments:
aio.init.patch (403.00 B)
aio.init.patch

2003-07-08 09:39:16

by Wim ten Have

[permalink] [raw]
Subject: Re: Bug fix in AIO initialization


Is there a definition how long system calls take when i issue
asynchronous read/write requests? The purpose is to not block
but occasionally i measure up to 100's of milliseconds before
the request is accepted or returns that there are currently
no resources making me try again. Is this normal?

--
-- Wim ten Have. AUDIX: 245 2981
Phone: (+31) 346 582981, Fax: Euro (+31) 346 552884, Room (+31) 346 558415

2003-07-08 12:24:05

by Suparna Bhattacharya

[permalink] [raw]
Subject: Re: Bug fix in AIO initialization

On Tue, Jul 08, 2003 at 11:53:45AM +0200, Wim ten Have wrote:
> Is there a definition how long system calls take when i issue
> asynchronous read/write requests? The purpose is to not block
> but occasionally i measure up to 100's of milliseconds before
> the request is accepted or returns that there are currently
> no resources making me try again. Is this normal?

Is this with vanilla 2.5 kernels or recent -mm kernels ?

Are you doing async O_DIRECT reads/writes or regular filesystem
aio read/writes ?

Regards
Suparna

--
Suparna Bhattacharya ([email protected])
Linux Technology Center
IBM Software Labs, India

2003-07-08 12:28:45

by Wim ten Have

[permalink] [raw]
Subject: Re: Bug fix in AIO initialization

On Tue, 8 Jul 2003 23:43:26 +0530
Suparna Bhattacharya <[email protected]> wrote:

> Is this with vanilla 2.5 kernels or recent -mm kernels ?

vanilla 2.5 kernels

> Are you doing async O_DIRECT reads/writes or regular filesystem
> aio read/writes ?

both.

--
-- Wim ten Have. AUDIX: 245 2981
Phone: (+31) 346 582981, Fax: Euro (+31) 346 552884, Room (+31) 346 558415

2003-07-08 13:57:52

by Suparna Bhattacharya

[permalink] [raw]
Subject: Re: Bug fix in AIO initialization

On Tue, Jul 08, 2003 at 02:41:21PM +0200, Wim ten Have wrote:
> On Tue, 8 Jul 2003 23:43:26 +0530
> Suparna Bhattacharya <[email protected]> wrote:
>
> > Is this with vanilla 2.5 kernels or recent -mm kernels ?
>
> vanilla 2.5 kernels
>
> > Are you doing async O_DIRECT reads/writes or regular filesystem
> > aio read/writes ?
>
> both.

Regular filesystem aio reads/writes aren't async at the
moment in the vanilla 2.5 tree, so that would be expected, but
you say you are seeing this with O_DIRECT as well ...

What kind of i/o sizes and loads are involved when you observe
this with O_DIRECT AIO ? Which filesystem are you using ?

Regards
Suparna

--
Suparna Bhattacharya ([email protected])
Linux Technology Center
IBM Software Labs, India