[lttng-dev] [URCU]Bug Report

Jin Huang andy.jinhuang at gmail.com
Fri Aug 14 01:28:59 EDT 2020


Hi, my name is Jin Huang.
I want to report 2 data races in userspace-rcu-master

Data Race 1: WW

Variable: crdp, defined at src/urcu-call-rcu-impl.h:424

Thread1: userspace-rcu/src/urcu-call-rcu-impl.h

Line 211, inside function set_thread_cpu_affinity:

if (++crdp->gp_count & SET_AFFINITY_CHECK_PERIOD_MASK)

Call order:

(1)pthread_create [src/urcu-call-rcu-impl.h:437]

(2)call_rcu_thread [src/urcu-call-rcu-impl.h:437]

(3)set_thread_cpu_affinity [src/urcu-call-rcu-impl.h:318]

Thread2: userspace-rcu/src/urcu-call-rcu-impl.h

Line 211, inside function set_thread_cpu_affinity:

if (++crdp->gp_count & SET_AFFINITY_CHECK_PERIOD_MASK)

Call order:

(1)pthread_create [src/urcu-call-rcu-impl.h:437]

(2)call_rcu_thread [src/urcu-call-rcu-impl.h:437]

(3)set_thread_cpu_affinity [src/urcu-call-rcu-impl.h:318]


Data Race 2: RW

Variable: crdp, defined at src/urcu-call-rcu-impl.h:424

Thread1: userspace-rcu/src/urcu-call-rcu-impl.h

Line 433, inside function call_rcu_data_init:

crdp->cpu_affinity = cpu_affinity;

Call order:

(1)perftest [src/rcutorture.h:590]

(2)perftestrun [src/rcutorture.h:244]

(3)urcu_signal_free_all_cpu_call_rcu_data [src/rcutorture.h:227]

(4)urcu_signal_get_default_call_rcu_data [src/urcu-call-rcu-impl.h:777]

(5)call_rcu_data_init [src/urcu-call-rcu-impl.h:572]

Thread2: userspace-rcu/src/urcu-call-rcu-impl.h

Line 209, inside function set_thread_cpu_affinity:

if (crdp->cpu_affinity < 0)

Call order:

(1)pthread_create [src/urcu-call-rcu-impl.h:437]

(2)call_rcu_thread [src/urcu-call-rcu-impl.h:437]

(3)set_thread_cpu_affinity [src/urcu-call-rcu-impl.h:318]




Thank You
Best
Jin Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20200814/7f543c40/attachment.htm>


More information about the lttng-dev mailing list