Kernel Thread Sanitizer (KTSAN)

Status: Prototype on-hold

Documentation: Documentation/ktsan.txt (somewhat outdated)

Found bugs: here

Contacts: Dmitry Vyukov <@dvyukov>, Andrey Konovalov <@xairy>


Kernel Thread Sanitizer (KTSAN) is a happens-before dynamic data-race detector for the Linux kernel.

KTSAN adapts the data-race detection algorithm of the userspace ThreadSanitizer (version 2; don’t confuse with version 1) to the Linux kernel.

Due to a significant complexity of the bug-detection algorithm when adapted to the Linux kernel and large CPU and RAM overheads, the project was put on-hold.

See Kernel Concurrency Sanitizer (KCSAN) for an alternative approach that uses watchpoints.

The latest KTSAN version based on 5.3 can be found in the ktsan branch. The original prototype based on 4.2 can be found under the tag ktsan_v4.2-with-fixes (also includes fixes for found data-races).

For more details about KTSAN, see:

Bugs, notes, and potential improvements