Is there a tool to detect data races in Julia?

Hi,

The question is in the title. I am struggling with a pretty nasty race condition (that I cannot locate) involving concurrent jump computations (having a copy of the model for each tasks).

Some tool like

https://clang.llvm.org/docs/ThreadSanitizer.html

would make my life a lot easier but I do not know if it could be done in Julia.

3 Likes

There’s previous threads here on Discourse regarding sanitizers like asan and tsan, and open issues on Github. There’s also this devdoc page:

The situation is, as far as I understand, such that the developers sometimes use some of the sanitizers to help themselves find bugs in Julia (bugs in the C/C++ code, I guess), but there’s no user-friendly solution yet.

Ideally Julia would plug into LLVM’s sanitizer support, but that still seems to be a long way off.

5 Likes

Perhaps a test case for GitHub - MilesCranmer/BorrowChecker.jl: A borrow checker for Julia ?

4 Likes