Open ghost opened 3 years ago
Okay, I'll try to fix soon but that might still be a while.
Technically this is a race condition as there could be write after read for num_error
. But functionally it doesn't make a difference, since master thread will always catch error value after master construct and exit. Other thread will wait at barrier inside bait_out
function immediately after the function call before all thread including master confirm valid inputs.
@jeffhammond what do you think? shall we close this?
Yes, I think we should close this.
What type of issue is this?
If this is a bug report, please use the following template. Otherwise, please delete the rest of the template.
Where does this bug appear?
Check all that apply:
Operating system
What is the output of
uname -a
? Linux 299fdde96882 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxCompiler
What is the output of
${COMPILER} -v
or${COMPILER} --version
? clang version 10.0.1PRK build information
Please attach or inline
make.defs
.Output showing problem
I detected a data race occurring in all of the OpenMP Kernels except for Refcount. All the Kernels have the same data race in involving the
num_error
variable, specifically when one thread will try to writenum_error=1
while another will try to readbail_out(num_error)
. An example from branch:The data race occurs between lines 9 and 26 in this snippet, or lines 207 and 224 of branch.c. I found this data race using the Coderrect Scanner https://coderrect.com/
Please do not attach screenshots of your terminal.