archer icon indicating copy to clipboard operation
archer copied to clipboard

Archer does not correctly call RunningOnValgrind on OSX

Open simoatze opened this issue 7 years ago • 3 comments

On Mac OSX "runOnTsan" is always initialized to 0 which consequently does not initialize the OMPT runtime. The races in the test suite are correctly reported but it reports false positives in the test with no races. On the other end if we force runOnTsan=1 no false positive is reported but Archer does not detect any race in the racy tests.

simoatze avatar May 20 '18 17:05 simoatze

I cannot really test this, but I think it should be || instead of && in https://github.com/PRUNERS/archer/blob/master/rtl/ompt-tsan.cpp#L173

I still don't understand what is going on with the tests. Are we sure, that the code is executed concurrently and not sequentially under OSX? I changed the tests to not use sleep, but signaling in: https://reviews.llvm.org/D45890 If these tests lead to deadlocks on OSX, execution is serialized.

jprotze avatar May 22 '18 15:05 jprotze

I think, I found another issue with the current implementation:

Initialization of the static variable runOnTsan might be a problem. I pushed fixes for the two issues to fix-runOnTsan. Please test whether this fixes your issues.

jprotze avatar May 24 '18 11:05 jprotze

I tried it, it seems better but it can't identify all the races in the task tests, and still a lot of false positives. Here's the list:

Failing Tests (19): libarcher :: barrier/barrier.c libarcher :: critical/critical.c libarcher :: critical/lock-nested.c libarcher :: critical/lock.c libarcher :: ompt/loadtool/tool_available.c libarcher :: races/task-dependency.c libarcher :: races/task-taskgroup-unrelated.c libarcher :: races/task-taskwait-nested.c libarcher :: races/task-two.c libarcher :: reduction/parallel-reduction-nowait.c libarcher :: reduction/parallel-reduction.c libarcher :: task/task-barrier.c libarcher :: task/task-create.c libarcher :: task/task-dependency.c libarcher :: task/task-taskgroup-nested.c libarcher :: task/task-taskgroup.c libarcher :: task/task-taskwait-nested.c libarcher :: task/task-taskwait.c libarcher :: worksharing/ordered.c

simoatze avatar May 26 '18 20:05 simoatze