# Is there a tool to detect data races in Julia?

**URL:** https://discourse.julialang.org/t/is-there-a-tool-to-detect-data-races-in-julia/127750
**Category:** General Usage
**Tags:** question
**Created:** [April 5, 2025, 8:19pm UTC](https://discourse.julialang.org/t/is-there-a-tool-to-detect-data-races-in-julia/127750 "2025-04-05T20:19:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [April 5, 2025, 8:19pm UTC](https://discourse.julialang.org/t/is-there-a-tool-to-detect-data-races-in-julia/127750/1 "2025-04-05T20:19:53Z")

</div>

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](https://clang.llvm.org/docs/ThreadSanitizer.html)

> **[Data Race Detector - The Go Programming Language](https://go.dev/doc/articles/race_detector)**

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

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [April 5, 2025, 8:49pm UTC](https://discourse.julialang.org/t/is-there-a-tool-to-detect-data-races-in-julia/127750/2 "2025-04-05T20:49:41Z")

</div>

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

> **[Sanitizer support · The Julia Language](https://docs.julialang.org/en/v1.13-dev/devdocs/sanitizers/)**
>
> Documentation for The Julia Language.

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.

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [April 5, 2025, 10:56pm UTC](https://discourse.julialang.org/t/is-there-a-tool-to-detect-data-races-in-julia/127750/3 "2025-04-05T22:56:33Z")

</div>

Perhaps a test case for [GitHub - MilesCranmer/BorrowChecker.jl: A borrow checker for Julia](https://github.com/MilesCranmer/BorrowChecker.jl) ?
