[lttng-dev] URCU and pthread mutex/cond variable hang
Jeff Layton
jlayton at poochiereds.net
Tue Mar 3 15:40:14 EST 2015
I've been using urcu to develop some userland code, and I've run into a
problem that I don't quite understand. If I register a thread and then
have that thread block on a pthread condition variable, then it seems
to cause synchronize_rcu in another thread to hang.
I've attached a testcase that demonstrates the problem. You have to
build it and link it against -lpthread and -lurcu-qsbr:
$ gcc -Wall -o ./urcu_hang -lpthread -lurcu-qsbr urcu_hang.c
...it will run fine. If you comment out the rcu_thread_offline/online
calls though, it will hang.
Why? Is this expected behavior or a bug in urcu?
Thanks in advance!
--
Jeff Layton <jlayton at poochiereds.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urcu_hang.c
Type: text/x-c++src
Size: 1262 bytes
Desc: not available
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150303/89d2e1c2/attachment.c>
More information about the lttng-dev
mailing list