Lune

ASPLOS2021Top-tier venue

Kard: lightweight data race detection with per-thread memory protection

Adil Ahmad, Sangho Lee, Pedro Fonseca, Byoungyoung Lee

2021Year
17Citations
9Top-tier citations

Abstract

Finding data race bugs in multi-threaded programs has proven challenging. A promising direction is to use dynamic detectors that monitor the program's execution for data races. However, despite extensive work on dynamic data race detection, most proposed systems for commodity hardware incur prohibitive overheads due to expensive compiler instrumentation of memory accesses; hence, they are not efficient enough to be used in all development and testing settings.

Kard is a lightweight system that dynamically detects data races caused by inconsistent lock usage-when a program concurrently accesses the same memory object using different locks or only some of the concurrent accesses are synchronized using a common lock. Unlike existing detectors, Kard does not monitor memory accesses using expensive compiler instrumentation. Instead, Kard leverages commodity per-thread memory protection, Intel Memory Protection Keys (MPK). Using MPK, Kard ensures that a shared object is only accessible to a single thread in its critical section, and captures all violating accesses from other concurrent threads. Kard overcomes various limitations of MPK by introducing key-enforced race detection, employing consolidated unique page allocation, carefully managing protection keys, and automatically pruning out non-racy or redundant violations. Our evaluation shows that Kard detects all data races caused by inconsistent lock usage and has a low geometric mean execution time overhead: 7.0% on PARSEC and SPLASH-2x benchmarks and 5.3% on a set of real-world applications (NGINX, memcached, pigz, and Aget).

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 21ff84b1-d6c4-4566-8139-a7d22e76a2eb

Cited by top-tier papers9

Ask how each one uses it

Builds on9

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines