Re: [RFC][PATCH] muptiple bugs in PI futexes

From: Alexey Kuznetsov
Date: Tue Jun 05 2007 - 13:40:46 EST


Hello!

> Hmm, what means not expected ? -ESRCH is returned, when the owner task
> is not found.

This is not supposed to happen with robust futexes.

glibs aborts (which is correct), or for build with disabled debugging
enters simulated deadlock (which is confusing).


> lock. Also using uval is wrong.

Yup. You are right.

This means those RETRY messages could be spurious. I must rerun the test.


> This does not really explain, why you do prevent the -ESRCH return value
> in the next cycle,

Because right curval is refetched, it already has FUTEX_OWNER_DIED bit set
and we succesfully take the lock.


> No, -EDEADLK is returned from here:
>
> ret = rt_mutex_timed_lock(&q.pi_state->pi_mutex, to, 1);

Of course. It is the only place where ret is set. :-)

>
> The rtmutex code only returns -EDEADLK, when the lock is already held by
> the task

This case.

> The fix is to remove it and to find the real cause of the problem.
>
> I'm running the glibc tests since hours w/o tripping into it.

OK.

You need run only tst-robustpi8 in loop. It should be triggered quickly,
a few of minutes on 8-way smp here.

If you want, I can insert some debugging printks, which you need,
and run the test here.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/