2011-03-28 17:17:58

by Klaus Dittrich

[permalink] [raw]
Subject: 2.6.37.6 2.6.38.2 tst-aio4.c

With both kernels, 2.6.37.6 and 2.6.38.2 tst-aio4.c of glibc fails.

It successfully completes with 2.6.37.5 and 2.6.38.1 and before.

I appended the code for convinice.


Attachments:
tst-aio4.c (3.45 kB)

2011-03-28 18:06:11

by Roland Dreier

[permalink] [raw]
Subject: Re: 2.6.37.6 2.6.38.2 tst-aio4.c

On Mon, Mar 28, 2011 at 10:17 AM, Klaus Dittrich <[email protected]> wrote:
> With both kernels, 2.6.37.6 and 2.6.38.2 tst-aio4.c of glibc fails.
>
> It successfully completes with 2.6.37.5 and 2.6.38.1 and before.
>
> I appended the code for convinice.

I took a quick look at this, and indeed the program succeeds on 2.6.38
but fails on the latest tip of Linus's tree. I'm pretty sure that the obvious
place to look, my patch "aio: wake all waiters when destroying ctx" is not
to blame, both because the patch is obviously correct :) and also because
this test is using the glibc aio implementation, which doesn't use the
kernel's aio code at all.

Indeed, an strace of the program shows that on old kernels, the child thread
does

rt_sigqueueinfo(16143, SIGRT_17, {si_signo=SIGRT_17,
si_code=SI_ASYNCIO, si_pid=16143, si_uid=1000, si_value={int=0,
ptr=0}}) = 0

while on the new kernel, it gets EPERM:

rt_sigqueueinfo(17198, SIGRT_17, {si_signo=SIGRT_17,
si_code=SI_ASYNCIO, si_pid=17198, si_uid=1000, si_value={int=0,
ptr=0}}) = -1 EPERM (Operation not permitted)

I'll take a look to see which -stable patch might be to blame.

- R.