Re: FUTEX_CMP_REQUEUE_PI is not quite there

From: Ulrich Drepper
Date: Sat Jun 09 2007 - 14:02:57 EST

Hash: SHA1

Thomas Gleixner wrote:
> Can you put the binaries somewhere for download please ?

I was waiting until I could test the current patches. DaveJ built a
kernel based on -rc4-git3 which I tested. The results are the same.

I've put a statically linked x86-64 binary at

Running it produces a backtrace with the 2.6.21-1.3218.fc8 kernel and
the machine dies.

The test case creates a robust, PI mutex. Five threads then run into a
condvar for this mutex. The main threads wakes them all with a
broadcast which causes the new requeue_pi code to be used. The woken
threads then (in pthread_cond_wait) lock the mutex and then kill
themselves while holding the mutex. This is supposed to have the result
that all but the first thread get EDEADOWNER errors.

Note: the condvar futex is not a PI futex. It cannot be, the semantics
is different. This is no locking futex. The kernel will have to deal
with this. The requeue operation is meaningless if this is not done
since it's only use is for this situation.

- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
Version: GnuPG v1.4.7 (GNU/Linux)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at