Project

General

Profile

Bug #1281

Data Races

Added by Jin Huang 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
08/14/2020
Due date:
% Done:

0%

Estimated time:

Description

Data Race 1: WW

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

Thread1: userspace-rcu/src/urcu-call-rcu-impl.h: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: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: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: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]

#1

Updated by Jonathan Rajotte Julien 2 months ago

  • Description updated (diff)

Hi Jin,

Thanks for reporting this.

Would you be able to give more context? is this output from a tool? If so, which is it? Could you provide a reproducer or at least explain a bit how you found this?

Normally the more information and context you provide the faster it is for us to understand the issue and fix it. While the information you provided is a good start, it is a bit dry.

Cheers

#2

Updated by Jin Huang 2 months ago

Jonathan Rajotte Julien wrote in #note-1:

Hi Jin,

Thanks for reporting this.

Would you be able to give more context? is this output from a tool? If so, which is it? Could you provide a reproducer or at least explain a bit how you found this?

Normally the more information and context you provide the faster it is for us to understand the issue and fix it. While the information you provided is a good start, it is a bit dry.

Cheers

No, I did not reproduce it, because data races can be just detected through static analysis.
The tool I use is https://coderrect.com/

#3

Updated by Jonathan Rajotte Julien 2 months ago

Hi Jin,

No, I did not reproduce it, because data races can be just detected through static analysis.

Well they can also be "observed" otherwise, I think you will agree with me, they would not be relevant at all. :)

The tool I use is https://coderrect.com/

We will look into this.

Cheers

Also available in: Atom PDF